FlagFtp
FlagFtp copied to clipboard
DirectoryExists check fails if there's a trailing slash
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.