From 8f1c085b6eb28e648326ca64d32439aa2cea5bb1 Mon Sep 17 00:00:00 2001 From: cotne nazarashvili Date: Wed, 8 Apr 2015 00:36:36 +0400 Subject: [PATCH] add support for local directory #1 --- browseWithWinSCP.py | 2 +- dirConfig.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/browseWithWinSCP.py b/browseWithWinSCP.py index 7763ed5..0c78689 100644 --- a/browseWithWinSCP.py +++ b/browseWithWinSCP.py @@ -14,7 +14,7 @@ pass if winscpExe: - startWinscpCommand = '"'+ winscpExe + '"' + ' {type}://{user}:{password}@{host}:{port}"{remote_path}"' + startWinscpCommand = '"'+ winscpExe + '"' + ' {type}://{user}:{password}@{host}:{port}"{remote_path}" /rawsettings LocalDirectory="{local_path}"' class browse_with_winscpCommand(sublime_plugin.WindowCommand): def run(self, edit = None): diff --git a/dirConfig.py b/dirConfig.py index 02c781b..d514cd9 100644 --- a/dirConfig.py +++ b/dirConfig.py @@ -104,7 +104,9 @@ def getConfig(name = 'sftp-config.json'): _file = getConfigFile(file_path, name) try: if isString(_file): - return parseJson(_file) + conf = parseJson(_file) + conf['local_path'] = os.path.dirname(_file) + return conf except: pass return None