Handle access denied scenario
[reactos.git] / cis / ReactOS.CustomRevisionAction / FtpClient.cs
index 4ba0970..30e5a5d 100644 (file)
@@ -730,7 +730,12 @@ namespace ReactOS.CustomRevisionAction
 \r
                        this.sendCommand( "CWD " + dirName );\r
 \r
-                       if ( this.resultCode != 250 ) throw new FtpException(result.Substring(4));\r
+                       if ( this.resultCode != 250 )\r
+                       {\r
+                               if (this.resultCode == 550)\r
+                                       throw new FtpException(String.Format("Access denied to {0}", this.remotePath + "/" + dirName));\r
+                               throw new FtpException(result.Substring(4));\r
+                       }\r
 \r
                        this.sendCommand( "PWD" );\r
 \r