Skip to content

Commit

Permalink
need to escape backslash
Browse files Browse the repository at this point in the history
  • Loading branch information
randybot committed Nov 25, 2012
1 parent b7a352b commit d016208
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Rsublime.py
Expand Up @@ -54,7 +54,7 @@ class ChangeDirCommand(sublime_plugin.TextCommand, RCommon):
# it is more efficient then reading settings everytime when "run" is executed # it is more efficient then reading settings everytime when "run" is executed
def run(self, edit): def run(self, edit):
path = os.path.dirname(self.view.file_name()) path = os.path.dirname(self.view.file_name())
cmd = "setwd(\"" + string.replace(path, '"', '\\"') + "\")" cmd = "setwd(\"" + self.clean(path) + "\")"
self.rcmd(cmd) self.rcmd(cmd)


######################### #########################
Expand All @@ -78,7 +78,7 @@ def run(self, edit, which):
class SourceCodeCommand(sublime_plugin.TextCommand, RCommon): class SourceCodeCommand(sublime_plugin.TextCommand, RCommon):
def run(self, edit): def run(self, edit):
path = self.view.file_name() path = self.view.file_name()
cmd = "source(\"" + string.replace(path, '"', '\\"') + "\")" cmd = "source(\"" + self.clean(path) + "\")"
self.rcmd(cmd) self.rcmd(cmd)


# Rapp switcher # Rapp switcher
Expand Down

0 comments on commit d016208

Please sign in to comment.