Skip to content

Commit

Permalink
Fixed failing test due to nullpointer
Browse files Browse the repository at this point in the history
  • Loading branch information
jmaassen committed Sep 10, 2019
1 parent 302690e commit d0ed3d0
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -312,13 +312,15 @@ protected void deleteFile(Path path) throws XenonException {
public boolean exists(Path path) throws XenonException {

try {
if (path.isEmpty()) {
Path tmp = toAbsolutePath(path);

if (tmp.isEmpty()) {
// special case for root. We assume it always exists.
return true;
}

// otherwise, we try to get stats on the file or directory
getFTPFileInfo(toAbsolutePath(path));
getFTPFileInfo(tmp);
return true;
} catch (NoSuchPathException e) {
return false;
Expand Down

0 comments on commit d0ed3d0

Please sign in to comment.