Commit d15fad7a authored by Marc-André Lemburg's avatar Marc-André Lemburg

Add quotes around the file name to avoid issues with spaces.

Closes #3719.
parent 91ae3ea2
......@@ -969,7 +969,7 @@ def _syscmd_file(target,default=''):
return default
target = _follow_symlinks(target)
try:
f = os.popen('file %s 2> /dev/null' % target)
f = os.popen('file "%s" 2> /dev/null' % target)
except (AttributeError,os.error):
return default
output = string.strip(f.read())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment