Skip to content
Browse files

Fixed a bug when RETR command was send

Fixed a bug in the RETR command. If the working directory wasn't the root (sandbox) directory, the RETR command could fail or send a wrong file.
  • Loading branch information...
1 parent 357f361 commit 1f3d9a6496c04049261bff638c9cfdf3796ea3aa @dododedodonl dododedodonl committed Sep 25, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 ftpd.js
View
2 ftpd.js
@@ -561,7 +561,7 @@ function createServer(host, sandbox) {
whenDataWritable( function(pasvconn) {
pasvconn.setEncoding(socket.mode);
- var filename = PathModule.resolve('/', commandArg);
+ var filename = PathModule.resolve(socket.fs.cwd(), commandArg);
if(filename != socket.filename)
{
socket.totsize = 0;

0 comments on commit 1f3d9a6

Please sign in to comment.
Something went wrong with that request. Please try again.