Permalink
Browse files

need to escape backslash

  • Loading branch information...
1 parent b7a352b commit d0162082cf4c80c02a7c005e421d21c5c81aba7f @shingx1 shingx1 committed Nov 25, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 Rsublime.py
View
@@ -54,7 +54,7 @@ class ChangeDirCommand(sublime_plugin.TextCommand, RCommon):
# it is more efficient then reading settings everytime when "run" is executed
def run(self, edit):
path = os.path.dirname(self.view.file_name())
- cmd = "setwd(\"" + string.replace(path, '"', '\\"') + "\")"
+ cmd = "setwd(\"" + self.clean(path) + "\")"
self.rcmd(cmd)
#########################
@@ -78,7 +78,7 @@ def run(self, edit, which):
class SourceCodeCommand(sublime_plugin.TextCommand, RCommon):
def run(self, edit):
path = self.view.file_name()
- cmd = "source(\"" + string.replace(path, '"', '\\"') + "\")"
+ cmd = "source(\"" + self.clean(path) + "\")"
self.rcmd(cmd)
# Rapp switcher

0 comments on commit d016208

Please sign in to comment.