Skip to content

Commit

Permalink
fix: handle symlink to file change on delta update
Browse files Browse the repository at this point in the history
- When upgrading from GE-Proton9-23 to GE-Proton9-24, the link file 'umu-356190.py' became a real file. As a result, a NotImplementedError would be raised when changing the file perms of the source file to be executable, resulting in an incomplete upgrade where that file would be missing. In these cases, the patcher needs to delete the link and insert the data on update.
  • Loading branch information
R1kaB3rN committed Feb 9, 2025
1 parent 7a71163 commit d854cc3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions umu/umu_bspatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,12 @@ def _patch_proton_file(self, path: Path, item: Entry) -> None:
mode: int = item["mode"]
size: int = item["size"]

if (item["type"] == FileType.File.value) and path.is_symlink():
path.unlink(missing_ok=True)
path.write_bytes(bdiff)
path.chmod(mode, follow_symlinks=False)
return

try:
# Since some wine binaries are missing the writable bit and
# we're memory mapping files. Before applying a binary patch,
Expand Down

0 comments on commit d854cc3

Please sign in to comment.