Put this in the wrong forum I think - Recursive calls not allowed
I have established that directories exist. I go through the rfi.names list to removed them but always get the Recursive calls not allowed.
It doesn't seem to matter what the path is.
It does seem to be resolving to the right point. Everything else I am doing besides removal is working happily. I am very confused.
public RemovalOperationResult RemoveFiles(string path) { using (Session session = new Session()) { session.Open(Config.FtpSessionOptions); return session.RemoveFiles(session.EscapeFileMask(path)); } } ---------------------------------------------------- RemoteDirectoryInfo rdi = ftpsSession.ListDirectory(ftpPath); foreach (RemoteFileInfo rfi in rdi.Files) { if (rfi.IsDirectory) { RemovalOperationResult ror; ror = ftpsSession.RemoveFiles(ftpPath + rfi.Name); if (ror.IsSuccess) { foreach (RemovalEventArgs removal in ror.Removals){ log.Event("Removal of " + removal.FileName + " succeeded"); } } else { log.Event("Removal failed."); return false; }
It doesn't seem to matter what the path is.
It does seem to be resolving to the right point. Everything else I am doing besides removal is working happily. I am very confused.