Differences
This shows you the differences between the selected revisions of the page.
2012-05-31 | 2012-08-03 | ||
actually no SessionRemoteException (martin) | removing workaround for bug 852 (martin) | ||
Line 3: | Line 3: | ||
&beta_feature | &beta_feature | ||
- | |||
- | //With WinSCP 5.0.7 beta the method always fails with ''InvalidOperationException'' with message "Recursive calls not allowed". As a workaround, use following extension method or equivalent:// | ||
- | |||
- | <code csharp> | ||
- | public static bool FileExistsFix(this Session session, string path) | ||
- | { | ||
- | try | ||
- | { | ||
- | session.GetFileInfo(path); | ||
- | return true; | ||
- | } | ||
- | catch (SessionRemoteException) | ||
- | { | ||
- | return false; | ||
- | } | ||
- | } | ||
- | </code> | ||
===== Syntax ===== | ===== Syntax ===== |