https://bugs.winehq.org/show_bug.cgi?id=53715
Bug ID: 53715 Summary: Vampire: The Masquerade - Redemption fails to overwrite save game Product: Wine-staging Version: 7.17 Hardware: x86-64 URL: https://archive.org/download/VampireTheMasquerade-Rede mption/vampire_demo.exe OS: Linux Status: NEW Keywords: download Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: gyebro69@gmail.com CC: erich.e.hoover@gmail.com, leslie_alistair@hotmail.com, z.figura12@gmail.com Distribution: ArchLinux
The game fails to perform a manual save when I select to overwrite an already existing saved game. Saving in a new (empty) slot is working properly. The problem doesn't occur with vanilla Wine.
To reproduce with the demo: Start a new game, you can skip dialogues by pressing <Space>. When you gain control over your party press <Esc> and save the game in an empty slot (saved game is timestamped). Wait for a couple seconds and save the game again using the same slot. No error message is shown, but the previous save is not overwritten.
The patch in Staging causing the problem: https://github.com/wine-staging/wine-staging/blob/master/patches/ntdll-DOS_A...
wine-7.17-224-g52a83ffe4ef (Staging)
vampire_demo.exe (88M) md5sum: c55b3e98dba49a1a4c5415be7b1a2bf5
https://bugs.winehq.org/show_bug.cgi?id=53715
--- Comment #1 from Erich E. Hoover erich.e.hoover@gmail.com --- Is this a new problem (recent rebase) or has this always happened with this game?
https://bugs.winehq.org/show_bug.cgi?id=53715
--- Comment #2 from Béla Gyebrószki gyebro69@gmail.com --- (In reply to Erich E. Hoover from comment #1)
Is this a new problem (recent rebase) or has this always happened with this game?
At least Wine-7.0 Staging has the same problem so it's not a new one.
https://bugs.winehq.org/show_bug.cgi?id=53715
--- Comment #3 from Erich E. Hoover erich.e.hoover@gmail.com --- (In reply to Béla Gyebrószki from comment #2)
(In reply to Erich E. Hoover from comment #1)
Is this a new problem (recent rebase) or has this always happened with this game?
At least Wine-7.0 Staging has the same problem so it's not a new one.
Great, that helps a lot. Does the problem go away if you enable "Show dot files" in the Drives tab of winecfg?
https://bugs.winehq.org/show_bug.cgi?id=53715
--- Comment #4 from Béla Gyebrószki gyebro69@gmail.com --- (In reply to Erich E. Hoover from comment #3)
(In reply to Béla Gyebrószki from comment #2)
(In reply to Erich E. Hoover from comment #1)
Is this a new problem (recent rebase) or has this always happened with this game?
At least Wine-7.0 Staging has the same problem so it's not a new one.
Great, that helps a lot. Does the problem go away if you enable "Show dot files" in the Drives tab of winecfg?
Yes, that did the trick, thank you.
https://bugs.winehq.org/show_bug.cgi?id=53715
--- Comment #5 from Erich E. Hoover erich.e.hoover@gmail.com --- (In reply to Béla Gyebrószki from comment #4)
(In reply to Erich E. Hoover from comment #3)
... Great, that helps a lot. Does the problem go away if you enable "Show dot files" in the Drives tab of winecfg?
Yes, that did the trick, thank you.
Huh, I'm surprised that helps. Can you check and see if the game's save files (or possible the directory they are saved in) start with a period (.)? It may be that this code path is somehow being triggered in a way that it should not be (the point of the patch is to consolidate the behavior so that it's applied universally, rather than marking files hidden in some code paths but not others, but it may be that there's a case where it's functioning improperly).
https://bugs.winehq.org/show_bug.cgi?id=53715
--- Comment #6 from Béla Gyebrószki gyebro69@gmail.com --- (In reply to Erich E. Hoover from comment #5)
(In reply to Béla Gyebrószki from comment #4)
(In reply to Erich E. Hoover from comment #3)
... Great, that helps a lot. Does the problem go away if you enable "Show dot files" in the Drives tab of winecfg?
Yes, that did the trick, thank you.
Huh, I'm surprised that helps. Can you check and see if the game's save files (or possible the directory they are saved in) start with a period (.)? It may be that this code path is somehow being triggered in a way that it should not be (the point of the patch is to consolidate the behavior so that it's applied universally, rather than marking files hidden in some code paths but not others, but it may be that there's a case where it's functioning improperly).
There are no dotfiles anywhere in the game directories including the savegame dir. There are, however, these files beginning with the exclamation mark (!) in each of the save game directories: !main.nsg. E.g. output of ls -a -R:
./SaveGames/SP0: . .. location_0.nsw location_1.nsw location_2.nsw location_7.nsw '!main.nsg'
Could this character (!) in front of the filename cause the problem?
https://bugs.winehq.org/show_bug.cgi?id=53715
--- Comment #7 from Erich E. Hoover erich.e.hoover@gmail.com --- No, but I see a mistake - try replacing: === + while (p > name && p[-1] == '\') p--; + while (p > name && p[-1] != '\') p--; === with: === + while (p > name && p[-1] == '/') p--; + while (p > name && p[-1] != '/') p--; ===
https://bugs.winehq.org/show_bug.cgi?id=53715
--- Comment #8 from Béla Gyebrószki gyebro69@gmail.com --- (In reply to Erich E. Hoover from comment #7)
No, but I see a mistake - try replacing:
- while (p > name && p[-1] == '\') p--;
- while (p > name && p[-1] != '\') p--;
=== with: ===
- while (p > name && p[-1] == '/') p--;
- while (p > name && p[-1] != '/') p--;
===
Unfortunately that doesn't fix the problem when 'Show dot files' is unchecked.
https://bugs.winehq.org/show_bug.cgi?id=53715
--- Comment #9 from Erich E. Hoover erich.e.hoover@gmail.com --- (In reply to Béla Gyebrószki from comment #8)
... Unfortunately that doesn't fix the problem when 'Show dot files' is unchecked.
I can take a look this weekend, but I would suspect that something odd is going on with the path that's passed to is_hidden_file(). If you are motivated to look at it now then you might try printing out the path if the return value "(p < end && *p == '.')" is true and see if there's something messed up about it.
https://bugs.winehq.org/show_bug.cgi?id=53715
--- Comment #10 from Erich E. Hoover erich.e.hoover@gmail.com --- (In reply to Béla Gyebrószki from comment #8)
Unfortunately that doesn't fix the problem when 'Show dot files' is unchecked.
If you don't mind testing, this should do the trick: === while (p > name && p[-1] == '/') p--; while (p > name && p[-1] != '/') p--; return (p < end && p[0] == '.' && p[1] && (p[1] != '.' || p[2])); ===
https://bugs.winehq.org/show_bug.cgi?id=53715
--- Comment #11 from Béla Gyebrószki gyebro69@gmail.com --- (In reply to Erich E. Hoover from comment #10)
If you don't mind testing, this should do the trick:
while (p > name && p[-1] == '/') p--; while (p > name && p[-1] != '/') p--; return (p < end && p[0] == '.' && p[1] && (p[1] != '.' || p[2]));
===
This fixes the problem, thank you.
Also fixes bug #52270.
https://bugs.winehq.org/show_bug.cgi?id=53715
--- Comment #12 from Erich E. Hoover erich.e.hoover@gmail.com --- *** Bug 52270 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=53715
Erich E. Hoover erich.e.hoover@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Fixed by SHA1| |4f75966580a72cb45d4f351826b | |158e527d1d754 Status|NEW |RESOLVED
--- Comment #13 from Erich E. Hoover erich.e.hoover@gmail.com --- Fixed by staging commit 4f75966580a72cb45d4f351826b158e527d1d754.
https://bugs.winehq.org/show_bug.cgi?id=53715
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #14 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Closing Fixed wine-staging bug.