Handle access denied scenario
Modified: trunk/cis/ReactOS.CustomRevisionAction/FtpClient.cs
_____
Modified: trunk/cis/ReactOS.CustomRevisionAction/FtpClient.cs
--- trunk/cis/ReactOS.CustomRevisionAction/FtpClient.cs 2005-12-13
17:56:27 UTC (rev 20145)
+++ trunk/cis/ReactOS.CustomRevisionAction/FtpClient.cs 2005-12-13
18:56:49 UTC (rev 20146)
@@ -730,7 +730,12 @@
this.sendCommand( "CWD " + dirName );
- if ( this.resultCode != 250 ) throw new
FtpException(result.Substring(4));
+ if ( this.resultCode != 250 )
+ {
+ if (this.resultCode == 550)
+ throw new
FtpException(String.Format("Access denied to {0}", this.remotePath +
"/"
+ dirName));
+ throw new
FtpException(result.Substring(4));
+ }
this.sendCommand( "PWD" );