"Recursive calls not allowed" error when enumerating files
I have been successfully getting files from remote server up to now. When I tried to add a data range constraints, I keep getting above error message.
// Enumerate files to download DateTime dtYesterday = DateTime.Today.AddDays(-1); /* This throws error */ //IEnumerable<RemoteFileInfo> fileInfos2 = session.EnumerateRemoteFiles(sRemotePath, "AP*.XML", EnumerationOptions.None).Where(file => file.LastWriteTime > dtYesterday); /* This works */ IEnumerable<RemoteFileInfo> fileInfos = session.EnumerateRemoteFiles(sRemotePath, "AP*.XML", WinSCP.EnumerationOptions.None);