07th-mod / 07th-mod/python-patcher

7-zip access denied error when overwriting files in game folder (in program files)

Open
#87 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
214
Forks
12
PR merge metrics
No merged PRs in 30d

Description

Some users have been reporting an error something like:

`ERROR: Can not delete output file : Access is denied. : C:\Program Files (x86)\GOG Galaxy\Games\Umineko When They Cry - Question Arcs\BGM\system0.ogg`

I've seen this happen to a higurashi user, and two umineko users (one using GOG Galaxy).

Some things with this issue:
- running the installer again doesn't fix the error (it will fail every time)
- running as administrator doesn't fix the error (hopefully when this was done it actually made 7zip also run as admin mode)
- moving the game folder somewhere other than program files first did seem to solve the issue (only one person has tried this though)
- probably has to do with overwriting files in the 'program files' folder of windows

I would like to test some things on a windows virtual machine (add antivirus software, run as a non-admin user etc.) to see if I can reproduce the error, but I haven't done so yet.

----

Higurashi example error:
```
ERROR: Can not open output file : Access is denied. : c:\program files (x86)\steam\steamapps\common\Higurashi 03 - Tatarigoroshi\HigurashiEp03_Data\StreamingAssets\CG\sprite\normal\re2b_komaru_b1_1.png
ERROR: Can not open output file : Access is denied. : c:\program files (x86)\steam\steamapps\common\Higurashi 03 - Tatarigoroshi\HigurashiEp03_Data\StreamingAssets\CG\sprite\normal\re2b_komaru_b1_2.png
ERROR: Can not open output file : Access is denied. : c:\program files (x86)\steam\steamapps\common\Higurashi 03 - Tatarigoroshi\HigurashiEp03_Data\StreamingAssets\CG\sprite\normal\re2b_warai_b1_0.png
ERROR: Can not open output file : Access is denied. : c:\program files (x86)\steam\steamapps\common\Higurashi 03 - Tatarigoroshi\HigurashiEp03_Data\StreamingAssets\CG\sprite\normal\re2b_warai_b1_1.png

```

----

Note that for umineko, currently there are only 3 files which fail to be overwritten:

- movie\umineko_op.mpg
- movie\umineko_op3.mpg
- BGM\system0.ogg (if using the bgm music patch)

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue involves 7-zip failing to overwrite files in Windows Program Files directories due to access denied errors. Start by examining the patcher's file extraction logic, likely in a module handling 7-zip calls or file operations. Reproduce the error on a Windows VM with antivirus and non-admin user to understand the exact conditions. Check how the patcher handles file permissions and overwrites, and look for existing code that moves or deletes files in protected directories.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.