FlagFtp icon indicating copy to clipboard operation
FlagFtp copied to clipboard

DirectoryExists check fails if there's a trailing slash

Open rikkit opened this issue 9 years ago • 0 comments

Say you have var uri = ftp://host/directory/subdir/

If you were to call FtpClient.DirectoryExists(uri)

The method DirectoryExists checks whether subdir is in the folder ftp://host/directory/

But because of this line, the method actually tests whether the directory ftp://host/directory/subdir/ exists inside the directory ftp://host/directory/subdir/./

... which is always false.

rikkit avatar Dec 29 '14 15:12 rikkit