Skip to content

Filenames with spaces cause the deltas to fail, resulting in full being downloaded #162

@cunnpole

Description

@cunnpole

After "Patch applied successfully" I get the following exception;

Unable to apply delta updates, falling back to full update.: System.Exception: Invalid release entry: 903B6727BF05FA7B1F46C78066DAA37FFE72926E Caiman IQ Desktop.deps.json.shasum 117288
at Velopack.ReleaseEntry.ParseReleaseEntry(String entry)
at Velopack.Compression.DeltaPackage.verifyPatchedFile(String relativeFilePath, String inputFile, String tempTargetFile)
at Velopack.Compression.DeltaPackage.applyDiffToFile(String deltaPath, String relativeFilePath, String workingDirectory)
at Velopack.Compression.DeltaPackage.ApplyDeltaPackageFast(String workingPath, String deltaPackageZip, Action1 progress) at Velopack.UpdateManager.DownloadAndApplyDeltaUpdates(String extractedBasePackage, UpdateInfo updates, Action1 progress, CancellationToken cancelToken)
at Velopack.UpdateManager.DownloadUpdatesAsync(UpdateInfo updates, Action`1 progress, Boolean ignoreDeltas, CancellationToken cancelToken)

The issue appears to be that entryRegex format doesnt like that:

m = entryRegex.Match(entry);

As an example, this fails:

Regex entryRegex = new Regex(@"^([0-9a-fA-F]{40})\s+(\S+)\s+(\d+)[\r]*$");
var m = entryRegex.Match("903B6727BF05FA7B1F46C78066DAA37FFE72926E Caiman IQ Desktop.deps.json.shasum 117288");

Whereas this passes and on the following group test:
var m = entryRegex.Match("903B6727BF05FA7B1F46C78066DAA37FFE72926E CaimanIQDesktop.deps.json.shasum 117288");

I would offer to fix this but this regex isnt compatible with my brain...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions