Skip to content

Commit ba519fb

Browse files
committed
Fix handling of file paths for Windows, always double quote file path
1 parent 5ef0f03 commit ba519fb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

gtm-plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class GTM(sublime_plugin.EventListener):
7272
sublime.error_message(no_gtm_err)
7373
else:
7474
# check support for [gtm record --status] feature
75-
p = subprocess.Popen("{0} record --help".format(gtm_path),
75+
p = subprocess.Popen('"{0}" record --help'.format(gtm_path),
7676
shell=True,
7777
stdin=subprocess.PIPE,
7878
stdout=subprocess.PIPE,
@@ -103,7 +103,7 @@ def record(self, view, path):
103103
GTM.last_update = time.time()
104104
GTM.last_path = path
105105

106-
cmd = '{0} record {1} "{2}"'.format(GTM.gtm_path,
106+
cmd = '"{0}" record {1} "{2}"'.format(GTM.gtm_path,
107107
GTM.status_option,
108108
path)
109109

0 commit comments

Comments
 (0)