Skip to content

Commit 52d6e34

Browse files
Ignore .nfs placeholder files when catching the error
- I forgot that `os.listdir` also lists hidden files in the previous commit
1 parent 67e1d56 commit 52d6e34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nipype/utils/filemanip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ def emptydirs(path, noexist_ok=False):
780780
try:
781781
shutil.rmtree(path)
782782
except OSError as ex:
783-
elcont = os.listdir(path)
783+
elcont = [p for p in os.listdir(path) if not p.startswith(".nfs")]
784784
if ex.errno in [errno.ENOTEMPTY, errno.EBUSY] and not elcont:
785785
fmlogger.warning(
786786
"An exception was raised trying to remove old %s, but the path"

0 commit comments

Comments
 (0)