Skip to content

Fix: Delta updates on non-English systems failed - #31

Merged
mherrmann merged 1 commit into
mainfrom
fix-delta-updates
Jun 24, 2026
Merged

Fix: Delta updates on non-English systems failed#31
mherrmann merged 1 commit into
mainfrom
fix-delta-updates

Conversation

@mherrmann

@mherrmann mherrmann commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

The failure message in log stream was:

Error: During delta extraction Error Domain=NSCocoaErrorDomain
Code=256 "Source doesn't have expected hash (... != ...).

The reason was that Sparkle uses a hash before delta update application to check whether the (old) destination contents are as expected. This hash calculation was locale-dependent.

This is the same as upstream's 8edc77f.

I believe the risk of this change is manageable because 1. upstream uses the same code and 2. as far as I have seen, it is only used for delta updates. In the worst case, we could fall back to shipping full updates only.

The failure message in `log stream` was:

    Error: During delta extraction Error Domain=NSCocoaErrorDomain
    Code=256 "Source doesn't have expected hash (... != ...).

The reason was that Sparkle uses a hash before delta update application
to check whether the (old) destination contents are as expected. This
hash calculation was locale-dependent.

This is the same as upstream's 8edc77f.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes delta update verification failures on non-English systems by making the file-sorting comparator used during tree hashing locale-independent, ensuring consistent hash computation across different user locales.

Changes:

  • Use the C locale explicitly for filename collation during FTS traversal.
  • Add the required locale header to access locale-specific collation APIs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@simonhong simonhong left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

@mherrmann
mherrmann merged commit d590458 into main Jun 24, 2026
5 checks passed
@mherrmann
mherrmann deleted the fix-delta-updates branch June 24, 2026 04:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants