From d15fad7a89d12afb8e0602c975909237865650c8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marc-Andr=C3=A9=20Lemburg?= Date: Tue, 2 Sep 2008 10:32:34 +0000 Subject: [PATCH] Add quotes around the file name to avoid issues with spaces. Closes #3719. --- Lib/platform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/platform.py b/Lib/platform.py index 73b6fdb676..cc0431bc56 100755 --- a/Lib/platform.py +++ b/Lib/platform.py @@ -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()) -- 2.50.1