Skip to content

Commit

Permalink
fix check folder
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudbore committed Jul 25, 2024
1 parent 3ab67f0 commit d1b475a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions dcm2bids/utils/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ def check(path: Path):
"could be overwritten or deleted.\nRerun the command "
"with --force option to overwrite "
"existing output files.")
else:
for child in path.iterdir():
if child.is_file():
os.remove(child)
elif child.is_dir():
shutil.rmtree(child)
else:
for child in path.iterdir():
if child.is_file():
os.remove(child)
elif child.is_dir():
shutil.rmtree(child)

if isinstance(required, str):
required = Path(required)
Expand Down

0 comments on commit d1b475a

Please sign in to comment.