X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=cis%2FReactOS.CustomRevisionAction%2FFtpClient.cs;h=30e5a5d6951b9b536dbab3cd553cff66764a1a30;hp=11b9634fc771fbcda3e266ee10b33f9925dab213;hb=afb3a846210914791d38c10900413dadeb7bda9d;hpb=5247d48cf1d98b48c2bf3bf4c5f8fde8d13f34e8 diff --git a/cis/ReactOS.CustomRevisionAction/FtpClient.cs b/cis/ReactOS.CustomRevisionAction/FtpClient.cs index 11b9634fc77..30e5a5d6951 100644 --- a/cis/ReactOS.CustomRevisionAction/FtpClient.cs +++ b/cis/ReactOS.CustomRevisionAction/FtpClient.cs @@ -354,7 +354,21 @@ namespace ReactOS.CustomRevisionAction return msg; } - + + public bool DirectoryExists(string directory) + { + try + { + ChangeDir(directory); + ChangeDir(".."); + return true; + } + catch (FtpException) + { + return false; + } + } + /// /// Return the size of a file. /// @@ -716,7 +730,12 @@ namespace ReactOS.CustomRevisionAction 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" );