FlagFtp
FlagFtp copied to clipboard
GetFiles error when Uri contains #
From http://flagftp.codeplex.com/workitem/1
I'm trying to remove a directory tree; so starting from base dir I traverse subdirs deleting files and finally dir itself.
public void DeleteDir(FtpDirectoryInfo di)
{
var files = GetFiles(di.Uri).ToList();
files.ForEach(f => { this.DeleteFile(f); });
GetDirectories(di.Uri).ToList().ForEach(d => DeleteDir(d));
DeleteDirectory(di);
}
During recursion, if it finds a subfolder having # in its Uri, an error occurs; note that using FileZilla this is handled correctly, so it's not a OS problem.
Thanks, Marco