Skip to content

Commit df9fd8e

Browse files
committed
Merge pull request #407 from Intendu/master
bsdiff bug fix: If bsdiff is being used, the delta update fails.
2 parents 3767b72 + 8918e58 commit df9fd8e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/SolutionAssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@
2525
// You can specify all the values or you can default the Build and Revision Numbers
2626
// by using the '*' as shown below:
2727

28-
[assembly: AssemblyVersion("0.99.3")]
28+
[assembly: AssemblyVersion("0.99.3.1")]

src/Squirrel/DeltaPackage.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,10 @@ public ReleasePackage ApplyDeltaPackage(ReleasePackage basePackage, ReleasePacka
112112
deltaPathRelativePaths
113113
.Where(x => x.StartsWith("lib", StringComparison.InvariantCultureIgnoreCase))
114114
.Where(x => !x.EndsWith(".shasum", StringComparison.InvariantCultureIgnoreCase))
115+
.Where(x => !x.EndsWith(".diff", StringComparison.InvariantCultureIgnoreCase) ||
116+
!deltaPathRelativePaths.Contains(x.Replace(".diff", ".bsdiff")))
115117
.ForEach(file => {
116-
pathsVisited.Add(Regex.Replace(file, @".diff$", "").ToLowerInvariant());
118+
pathsVisited.Add(Regex.Replace(file, @"\.(bs)?diff$", "").ToLowerInvariant());
117119
applyDiffToFile(deltaPath, file, workingPath);
118120
});
119121

@@ -254,7 +256,7 @@ void applyDiffToFile(string deltaPath, string relativeFilePath, string workingDi
254256

255257
void verifyPatchedFile(string relativeFilePath, string inputFile, string tempTargetFile)
256258
{
257-
var shaFile = Regex.Replace(inputFile, @"\.diff$", ".shasum");
259+
var shaFile = Regex.Replace(inputFile, @"\.(bs)?diff$", ".shasum");
258260
var expectedReleaseEntry = ReleaseEntry.ParseReleaseEntry(File.ReadAllText(shaFile, Encoding.UTF8));
259261
var actualReleaseEntry = ReleaseEntry.GenerateFromFile(tempTargetFile);
260262

0 commit comments

Comments
 (0)