Open mrmnmly opened 8 years ago
I also have this problem.
In my case it works on directories that only contain files, but on directories that contain other directories it fails.
Here's the error that I get, I'm not sure how usefull it is since I use your library through promise-ftp. I'll try to reproduce it with your library alone on monday.
{ Error: /htdocs/images/icons: Das Verzeichnis ist nicht leer
at makeError (/Users/egon/src/iski.world/node_modules/ftp/lib/connection.js:1067:13)
at Parser.<anonymous> (/Users/egon/src/iski.world/node_modules/ftp/lib/connection.js:113:25)
at emitTwo (events.js:106:13)
at Parser.emit (events.js:191:7)
at Parser._write (/Users/egon/src/iski.world/node_modules/ftp/lib/parser.js:59:10)
at doWrite (_stream_writable.js:307:12)
at writeOrBuffer (_stream_writable.js:293:5)
at Parser.Writable.write (_stream_writable.js:220:11)
at Socket.ondata (/Users/egon/src/iski.world/node_modules/ftp/lib/connection.js:273:20)
at emitOne (events.js:96:13) code: 550 }
Ok I just tested it with this library and it seems to work now. So in my case the issue is probably with promise-ftp
I cannot delete a folder that is not empty :(
this is my code :
c.on('ready', function() {
switch(itemType){
case 'file':
c.delete(itemID, function(err) {
c.end();
callback(err);
});
break;
case 'folder':
c.rmdir(itemID, true, function(err) {
c.end();
callback(err);
});
break;
default:
callback(true);
}
});
And I'm always getting the same error:
error: { [Error: Can't remove directory: Directory not empty]
cause: { [Error: Can't remove directory: Directory not empty] code: 550 },
isOperational: true,
code: 550 }
Any idea?
I'm trying to remove folder with its contents using
rmdir
method withrecursive
parameter that is set totrue
.Documentation says:
But I'm getting an error:
Anyone tried similar operation? Please help.