evanplaice / node-ftpsync

Intelligent file syncronization over FTP
http://evanplaice.github.io/node-ftpsync
MIT License
74 stars 21 forks source link

550 : Cannot create a file when that file already exists #22

Closed keel closed 8 years ago

keel commented 9 years ago

I got this error, the ftp server maybe windows ,I guess.

Collection complete.

Consolidating
-------------------------------------------------------------
Mkdir:
[ '/2015',
  '/2015/try-hexo',
  '/2015/update-openssh-6',
  '/archives/2015',
  '/archives/2015/11' ]

Rmdir:
[ '/tasks2', '/archives/5', '/5' ]

Add:
[ '/2015/try-hexo/index.html',
  '/archives/2015/11/index.html',
  '/archives/2015/index.html' ]

Updates:
[]

Remove:
[ '/hjtkdz2.apk' ]

Consolidation complete.

Committing
-------------------------------------------------------------
MKDIR failed.
MKDIRs failed.
Commit failed.
Commit complete.
MKDIRs complete.
- ./wwwroot/2015 created successfuly
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Error: 550 ./wwwroot/2015: Cannot create a file when that file already exists. 
    at Ftp.parse (/Users/keel/dev/hexo/node_modules/jsftp/lib/jsftp.js:257:11)
    at Ftp.parseResponse (/Users/keel/dev/hexo/node_modules/jsftp/lib/jsftp.js:174:8)
    at Stream.<anonymous> (/Users/keel/dev/hexo/node_modules/jsftp/lib/jsftp.js:146:24)
    at emitOne (events.js:77:13)
    at Stream.emit (events.js:169:7)
    at ResponseParser.reemit (/Users/keel/dev/hexo/node_modules/duplexer/index.js:70:25)
    at emitOne (events.js:77:13)
    at ResponseParser.emit (events.js:169:7)
    at readableAddChunk (_stream_readable.js:146:16)
    at ResponseParser.Readable.push (_stream_readable.js:110:10)
    at ResponseParser.Transform.push (_stream_transform.js:128:32)
    at ResponseParser.<anonymous> (/Users/keel/dev/hexo/node_modules/ftp-response-parser/index.js:65:12)
    at Array.forEach (native)
    at ResponseParser._transform (/Users/keel/dev/hexo/node_modules/ftp-response-parser/index.js:48:9)
    at ResponseParser.Transform._read (_stream_transform.js:167:10)
    at ResponseParser.Transform._write (_stream_transform.js:155:12)
    at doWrite (_stream_writable.js:292:12)
    at writeOrBuffer (_stream_writable.js:278:5)
    at ResponseParser.Writable.write (_stream_writable.js:207:11)
    at Socket.ondata (_stream_readable.js:528:20)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
keel commented 9 years ago

But FileZilla works fine. is there a way to force overwrite the dirs?

keel commented 9 years ago

And I found the error happened when the remote dir is pure numbers, like '2015' . I change it to 'y2015' ,it will be fine, and Consolidating will not count this dir.

keel commented 9 years ago

OK, I just find the remote dirs in Collecting log is wrong. the real remote list is:

[ '/about',
     '/archives',
     '/archives/2015',
     '/archives/2015/11',

but the log is :

[ '/about',
     '/archives',
     '/archives/5',
keel commented 9 years ago

OK, I Fix it myself , it's a jsftp's bug. https://github.com/sergi/parse-listing/pull/8

evanplaice commented 9 years ago

@keel Is the change available yet via NPM? If so, I'll update the dependency.

keel commented 9 years ago

not yet, not got response from @sergi

evanplaice commented 9 years ago

@keel cool, let me know when you find out. Alternatively, if you want to take care of it you could submit the update as a PR and I'll merge it in.

keel commented 9 years ago

@evanplaice , Sergi fixed it. it's ok now.

evanplaice commented 8 years ago

@keel Sorry about the delay. Updating the dependencies caused some issues that broke my tests.

Everything should be up-to-date and working now. Incl jsftp.