-make sure lsof works for files with spaces

This commit is contained in:
Martin Konecny 2012-12-03 16:33:24 -05:00
parent 7249e36081
commit e3761bd8d6
1 changed files with 1 additions and 2 deletions

View File

@ -162,8 +162,7 @@ def walk_supported(directory, clean_empties=False):
def file_locked(path): def file_locked(path):
cmd = "lsof %s" % path f = Popen(["lsof", path], stdout=PIPE).stdout
f = Popen(cmd, shell=True, stdout=PIPE).stdout
return bool(f.readlines()) return bool(f.readlines())
def magic_move(old, new, after_dir_make=lambda : None): def magic_move(old, new, after_dir_make=lambda : None):