Skip to content

Commit

Permalink
Fixed #19, Duplicate folder in folder we upload to
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasz.wronski committed Jan 10, 2016
1 parent 8708760 commit 1f52d55
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions modules/sync-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit 1f52d55

Please sign in to comment.