Skip to content

Commit

Permalink
Added null check to the GetFtpPath extension method that builds path …
Browse files Browse the repository at this point in the history
…with variable length args.
  • Loading branch information
jptrosclair committed Jan 7, 2014
1 parent 162e146 commit 3e1abf2
Show file tree
Hide file tree
Showing 51 changed files with 5 additions and 2 deletions.
Empty file modified .gitignore
100755 → 100644
Empty file.
Empty file modified Examples/BeginConnect.cs
100755 → 100644
Empty file.
Empty file modified Examples/BeginCreateDirectory.cs
100755 → 100644
Empty file.
Empty file modified Examples/BeginDeleteDirectory.cs
100755 → 100644
Empty file.
Empty file modified Examples/BeginDeleteFile.cs
100755 → 100644
Empty file.
Empty file modified Examples/BeginDereferenceLink.cs
100755 → 100644
Empty file.
Empty file modified Examples/BeginDirectoryExists.cs
100755 → 100644
Empty file.
Empty file modified Examples/BeginDisconnect.cs
100755 → 100644
Empty file.
Empty file modified Examples/BeginExecute.cs
100755 → 100644
Empty file.
Empty file modified Examples/BeginFileExists.cs
100755 → 100644
Empty file.
Empty file modified Examples/BeginGetFileSize.cs
100755 → 100644
Empty file.
Empty file modified Examples/BeginGetListing.cs
100755 → 100644
Empty file.
Empty file modified Examples/BeginGetModifiedTime.cs
100755 → 100644
Empty file.
Empty file modified Examples/BeginGetNameListing.cs
100755 → 100644
Empty file.
Empty file modified Examples/BeginGetWorkingDirectory.cs
100755 → 100644
Empty file.
Empty file modified Examples/BeginOpenAppend.cs
100755 → 100644
Empty file.
Empty file modified Examples/BeginOpenRead.cs
100755 → 100644
Empty file.
Empty file modified Examples/BeginOpenWrite.cs
100755 → 100644
Empty file.
Empty file modified Examples/BeginRename.cs
100755 → 100644
Empty file.
Empty file modified Examples/BeginSetWorkingDirectory.cs
100755 → 100644
Empty file.
Empty file modified Examples/DereferenceLink.cs
100755 → 100644
Empty file.
Empty file modified Examples/GetChecksum.cs
100755 → 100644
Empty file.
Empty file modified Examples/GetHash.cs
100755 → 100644
Empty file.
Empty file modified Examples/GetHashAlgorithm.cs
100755 → 100644
Empty file.
Empty file modified Examples/SetHashAlgorithm.cs
100755 → 100644
Empty file.
Empty file modified FtpClient.VS2012.sln
100755 → 100644
Empty file.
Empty file modified Sandcastle/API_Reference_CHM.shfbproj
100755 → 100644
Empty file.
Empty file modified Sandcastle/API_Reference_HTML.shfbproj
100755 → 100644
Empty file.
Empty file modified Sandcastle/README.txt
100755 → 100644
Empty file.
Empty file modified System.Net.FtpClient/Extensions/GetChecksum.cs
100755 → 100644
Empty file.
Empty file modified System.Net.FtpClient/Extensions/MD5.cs
100755 → 100644
Empty file.
Empty file modified System.Net.FtpClient/Extensions/XCRC.cs
100755 → 100644
Empty file.
Empty file modified System.Net.FtpClient/Extensions/XMD5.cs
100755 → 100644
Empty file.
Empty file modified System.Net.FtpClient/Extensions/XSHA1.cs
100755 → 100644
Empty file.
Empty file modified System.Net.FtpClient/Extensions/XSHA256.cs
100755 → 100644
Empty file.
Empty file modified System.Net.FtpClient/Extensions/XSHA512.cs
100755 → 100644
Empty file.
Empty file modified System.Net.FtpClient/FtpClient.cs
100755 → 100644
Empty file.
Empty file modified System.Net.FtpClient/FtpExtensionAttribute.cs
100755 → 100644
Empty file.
3 changes: 3 additions & 0 deletions System.Net.FtpClient/FtpExtensions.cs
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ public static string GetFtpPath(this string path) {
/// <param name="segments">The path segments to append</param>
/// <returns>A valid FTP path</returns>
public static string GetFtpPath(this string path, params string[] segments) {
if (String.IsNullOrEmpty(path))
path = "./";

foreach (string part in segments) {
if (part != null) {
if (path.Length > 0 && !path.EndsWith("/"))
Expand Down
Empty file modified System.Net.FtpClient/FtpHash.cs
100755 → 100644
Empty file.
Empty file modified System.Net.FtpClient/FtpListItem.cs
100755 → 100644
Empty file.
Empty file modified System.Net.FtpClient/FtpTrace.cs
100755 → 100644
Empty file.
Empty file modified System.Net.FtpClient/IFtpClient.cs
100755 → 100644
Empty file.
Empty file modified System.Net.FtpClient/IFtpListItem.cs
100755 → 100644
Empty file.
Empty file modified System.Net.FtpClient/IFtpReply.cs
100755 → 100644
Empty file.
Empty file modified System.Net.FtpClient/System.Net.FtpClient.NET2.csproj
100755 → 100644
Empty file.
Empty file modified System.Net.FtpClient/System.Net.FtpClient.NET2.sln
100755 → 100644
Empty file.
4 changes: 2 additions & 2 deletions Tests/Program.cs
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ static void Main(string[] args) {
FtpTrace.AddListener(new ConsoleTraceListener());

try {
/*foreach (int i in new int[] {
foreach (int i in new int[] {
(int)FtpDataConnectionType.EPSV,
(int)FtpDataConnectionType.EPRT,
(int)FtpDataConnectionType.PASV,
Expand All @@ -41,7 +41,7 @@ static void Main(string[] args) {
Download(cl);
Delete(cl);
}
}*/
}

//TestServer();

Expand Down
Empty file modified build_docs.bat
100755 → 100644
Empty file.
Empty file modified create_codeplex_release.bat
100755 → 100644
Empty file.
Empty file modified create_nuget_release.bat
100755 → 100644
Empty file.

0 comments on commit 3e1abf2

Please sign in to comment.