Skip to content

Commit

Permalink
Confused in the git...
Browse files Browse the repository at this point in the history
  • Loading branch information
yger committed Jul 1, 2024
1 parent be96f5e commit e052f04
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/spikeinterface/preprocessing/motion.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,12 +320,11 @@ def correct_motion(
if folder is not None:
folder = Path(folder)
if overwrite:
if folder.exists():
if folder.is_dir():
import shutil
shutil.rmtree(folder)
else:
assert not folder.exists(), f"Folder {folder} already exists"

folder.mkdir(exist_ok=True, parents=True)

(folder / "parameters.json").write_text(json.dumps(parameters, indent=4, cls=SIJsonEncoder), encoding="utf8")
Expand Down

0 comments on commit e052f04

Please sign in to comment.