FlagFtp icon indicating copy to clipboard operation
FlagFtp copied to clipboard

GetFiles error when Uri contains #

Open flagbug opened this issue 11 years ago • 0 comments

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

flagbug avatar Dec 03 '12 14:12 flagbug