Skip to content

Commit

Permalink
Fixed issue 12962: Cab file could not be created for folders with spa…
Browse files Browse the repository at this point in the history
…ces in them.

#12962     The Cab task does not creating cabs for folder paths with spaces in them
  • Loading branch information
hamid_shahid_cp authored and hamid_shahid_cp committed Apr 28, 2014
1 parent 05fc853 commit 2175f0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Solutions/Main/Framework/Compression/Cab.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ private void AddFile()
StringBuilder options = new StringBuilder();
options.Append("-r -p");
options.AppendFormat(" -P \"{0}\"\\", dirInfo.FullName.Remove(dirInfo.FullName.Length - 1).Replace(@"C:\", string.Empty));
cabProcess.StartInfo.Arguments = string.Format(CultureInfo.CurrentCulture, @"{0} N ""{1}"" {2}", options, this.CabFile.GetMetadata("FullPath"), "\"" + dirInfo.FullName + "*.*\"" + " ");
cabProcess.StartInfo.Arguments = string.Format(CultureInfo.CurrentCulture, @"{0} N ""{1}"" ""{2}""", options, this.CabFile.GetMetadata("FullPath"), "\"" + dirInfo.FullName + "*.*\"" + " ");
this.LogTaskMessage(string.Format(CultureInfo.CurrentCulture, "Calling {0} with {1}", this.CabExePath.GetMetadata("FullPath"), cabProcess.StartInfo.Arguments));

// start the process
Expand Down Expand Up @@ -377,7 +377,7 @@ private void Create()
files = this.FilesToCab.Aggregate(files, (current, file) => current + ("\"" + file.ItemSpec + "\"" + " "));
}

cabProcess.StartInfo.Arguments = string.Format(CultureInfo.CurrentCulture, @"{0} N ""{1}"" {2}", options, this.CabFile.GetMetadata("FullPath"), files);
cabProcess.StartInfo.Arguments = string.Format(CultureInfo.CurrentCulture, @"{0} N ""{1}"" ""{2}""", options, this.CabFile.GetMetadata("FullPath"), files);
this.LogTaskMessage(string.Format(CultureInfo.CurrentCulture, "Calling {0} with {1}", this.CabExePath.GetMetadata("FullPath"), cabProcess.StartInfo.Arguments));

// start the process
Expand Down

0 comments on commit 2175f0b

Please sign in to comment.