Skip to content

Commit

Permalink
fixed check if new path is a directory when changed working dir, caus…
Browse files Browse the repository at this point in the history
…ed issues with some clients as they where using file paths in cwd commands, see GH issue #41
  • Loading branch information
wolpi committed Jan 9, 2016
1 parent e8d94ce commit 0c869de
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package org.primftpd.filesystem;

import java.io.File;

import org.apache.ftpserver.ftplet.FtpException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import android.os.Environment;
import java.io.File;

public abstract class AndroidFileSystemView<T extends AndroidFile<X>, X> {

Expand Down Expand Up @@ -41,7 +39,8 @@ public boolean changeWorkingDirectory(String dir) {

File dirObj = new File(dir);

if (dirObj.isFile()) {
// don't use isFile() as that does not give correct result
if (!dirObj.isDirectory()) {
logger.trace("not changing WD as new one is file");
return false;
}
Expand Down

0 comments on commit 0c869de

Please sign in to comment.