Merge branch 'lsof_quote_fix' of https://github.com/rgrinberg/Airtime into devel
This commit is contained in:
commit
735640d40b
|
@ -6,7 +6,7 @@ import os
|
||||||
import math
|
import math
|
||||||
import wave
|
import wave
|
||||||
import contextlib
|
import contextlib
|
||||||
import shutil
|
import shutil, pipes
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
import hashlib
|
import hashlib
|
||||||
|
@ -162,7 +162,7 @@ def walk_supported(directory, clean_empties=False):
|
||||||
|
|
||||||
|
|
||||||
def file_locked(path):
|
def file_locked(path):
|
||||||
cmd = "lsof %s" % path
|
cmd = "lsof %s" % (pipes.quote(path))
|
||||||
f = Popen(cmd, shell=True, stdout=PIPE).stdout
|
f = Popen(cmd, shell=True, stdout=PIPE).stdout
|
||||||
return bool(f.readlines())
|
return bool(f.readlines())
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue