From 1f52d558f8aba254d6f88bf3c2806ba494375d4b Mon Sep 17 00:00:00 2001 From: "lukasz.wronski" Date: Sun, 10 Jan 2016 16:29:34 +0100 Subject: [PATCH] Fixed #19, Duplicate folder in folder we upload to --- README.md | 5 +++++ modules/sync-helper.js | 4 ++-- package.json | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 90baf93..23c7160 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,9 @@ reproduce your error and fix it without detailed informations. I'm looking forward to get any feedback from extension users! Contribution, especially on bug fixing is more than welcome! +Great thanks for suggestions and help with debugging for [Martin](https://github.com/kasik96), +[Allan](https://github.com/EthraZa) and all other folks who reported bugs or made improvement requests. + ------ Use at your own risk - I do not guarantee that it will work correctly! @@ -53,6 +56,8 @@ Use at your own risk - I do not guarantee that it will work correctly! ## Version history +- 0.2.4 + - Fix for [Duplicate folder in folder we upload to](https://github.com/lukasz-wronski/vscode-ftp-sync/issues/19) - 0.2.3 - Fix for [Cant download](https://github.com/lukasz-wronski/vscode-ftp-sync/issues/14) - 0.2.2 diff --git a/modules/sync-helper.js b/modules/sync-helper.js index 9bb5bfb..32daa1e 100644 --- a/modules/sync-helper.js +++ b/modules/sync-helper.js @@ -288,12 +288,12 @@ var uploadFile = function(localPath, rootPath, callback) { var remoteDir = upath.toUnix(path.dirname(remotePath)); connect(function(err) { if(err) callback(err); - else ftp.cwd(remoteDir, function(err) { + else ftp.list(remoteDir, function(err) { if(!err) { ftp.put(localPath, remotePath, function(err) { callback(err); }) - } else if(err.code == 550) { + } else if(err.code == 450) { ftp.mkdir(remoteDir, true, function(err) { if(err) callback(err) else ftp.put(localPath, remotePath, function(err) { diff --git a/package.json b/package.json index 829eeb4..4e1f86f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ftp-sync", "description": "Auto sync your work to remote FTP server", - "version": "0.2.3", + "version": "0.2.4", "publisher": "lukasz-wronski", "engines": { "vscode": "^0.10.1"