undo - make sure path names are quoted when passing to lsof
This commit is contained in:
parent
deb50ea769
commit
e35416b1e8
2 changed files with 3 additions and 2 deletions
|
@ -166,7 +166,8 @@ def walk_supported(directory, clean_empties=False):
|
|||
|
||||
|
||||
def file_locked(path):
|
||||
proc = Popen(["lsof", '"%s"' % path], stdout=PIPE)
|
||||
#Capture stderr to avoid polluting py-interpreter.log
|
||||
proc = Popen(["lsof", path], stdout=PIPE, stderr=PIPE)
|
||||
out = proc.communicate()[0].strip('\r\n')
|
||||
return bool(out)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue