mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
Add quotes around the file name to avoid issues with spaces.
Closes #3719. Ported to 3.0 from r66145.
This commit is contained in:
parent
54bd41d81b
commit
407798595d
1 changed files with 1 additions and 1 deletions
|
@ -945,7 +945,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 = f.read().strip()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue