Handle access denied scenario
authorCasper Hornstrup <chorns@users.sourceforge.net>
Tue, 13 Dec 2005 18:56:49 +0000 (18:56 +0000)
committerCasper Hornstrup <chorns@users.sourceforge.net>
Tue, 13 Dec 2005 18:56:49 +0000 (18:56 +0000)
svn path=/trunk/; revision=20146

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