-make sure lsof works for files with spaces
This commit is contained in:
parent
7249e36081
commit
e3761bd8d6
|
@ -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):
|
||||||
|
|
Loading…
Reference in New Issue