[Bug 45359] New: Kingdom Come: SHGetKnownFolderPath(FOLDERID_SavedGames) returns incorrect folder
https://bugs.winehq.org/show_bug.cgi?id=45359 Bug ID: 45359 Summary: Kingdom Come: SHGetKnownFolderPath(FOLDERID_SavedGames) returns incorrect folder Product: Wine Version: 3.10 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: minor Priority: P2 Component: -unknown Assignee: wine-bugs(a)winehq.org Reporter: jaapbuurman(a)gmail.com Distribution: --- Kingdom Come saves to the "C:/users/username/Saved Games/" folder on my Windows PC. However, on my Linux PC running Wine, it saves to the folder "C:/users/username/My Documents/" folder instead. Because Steam expects the save games in the first folder mentioned, the save games do not get synced to Steam's cloud. I have contacted the Kingdom Come developers, which mentioned that they use SHGetKnownFolderPath(FOLDERID_SavedGames) function to fetch the path to the save game location. My Wine logging shows the following error: 00d8:fixme:shell:SHGetKnownFolderPath flags 0x0000a000 not supported -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=45359 jaapbuurman(a)gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|minor |normal -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=45359 jaapbuurman(a)gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Distribution|--- |ArchLinux -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=45359 Fabian Maurer <dark.shadow4(a)web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4(a)web.de --- Comment #1 from Fabian Maurer <dark.shadow4(a)web.de> --- For me SHGetKnownFolderPath returns "C:\users\fabian\Saved Games" though. Does the folder "C:/users/username/Saved Games/" exist on your system? Because if not, it might use some fallback. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=45359 --- Comment #2 from jaapbuurman(a)gmail.com --- Yes, that folder does exist in the Wine prefix I am using. Is there an easy way to run the SHGetKnownFolderPath command manually myself? Perhaps the information I got from Kingdom Come's developers is not accurate? Or is it possible to up the verbosity of Wine's debugging to figure out what function call is being done by Kingdom Come? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=45359 --- Comment #3 from jaapbuurman(a)gmail.com --- Some additional information: I sent the error from the Wine logs back to Kingdom Come's developers and asked if that rang any bell. And this is the response that I received: it does a ring a bell, flag 0x0000a000 is combination of KF_FLAG_CREATE|KF_FLAG_DONT_UNEXPAND SHGetKnownFolderPath(FOLDERID_SavedGames, KF_FLAG_CREATE|KF_FLAG_DONT_UNEXPAND, NULL, &wMyDocumentsPath); // Make sure that the folder already exists or create it and apply security specified in folder definition // If folder can not be created then function will return failure and no folder path (IDList) will be returned // If folder is located on the network the function may take long time to execute KF_FLAG_CREATE = 0x00008000, // Set folder path as is and do not try to substitute parts of the path with environments variables. // If flag is not specified then Known Folder will try to replace parts of the path with some // known environment variables (%USERPROFILE%, %APPDATA% etc.) KF_FLAG_DONT_UNEXPAND = 0x00002000, So perhaps the vanilla SHGetKnownFolderPath does work properly, but not with the flags they are using? And hence the failure the grab the correct "Saved Games" folder's path? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=45359 --- Comment #4 from jaapbuurman(a)gmail.com --- I forgot to mention: Their function call also has the My Documents folder as a fallback: &wMyDocumentsPath Given the fact Wine's error complains about those flags, I assume it then simply evaluates the function to the fallback rather than getting the correct "Saved Games" folder, because it does not know how to handle those flags. Am I correct in my thinking here? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=45359 --- Comment #5 from Fabian Maurer <dark.shadow4(a)web.de> --- Created attachment 61666 --> https://bugs.winehq.org/attachment.cgi?id=61666 Test case Yes you're correct. I knew about the flags, I even looked them up, but of course I forget them in my tests... You're right, when KF_FLAG_DONT_UNEXPAND is used as flag, wine simply returns an error. Since you asked for it, attaching a test case. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=45359 Fabian Maurer <dark.shadow4(a)web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Kingdom Come: |SHGetKnownFolderPath |SHGetKnownFolderPath(FOLDER |doesn't handle flag |ID_SavedGames) returns |KF_FLAG_DONT_UNEXPAND |incorrect folder | Keywords| |testcase Component|-unknown |shell32 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #6 from Fabian Maurer <dark.shadow4(a)web.de> --- Also confirming issue and filling in fields -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=45359 --- Comment #7 from jaapbuurman(a)gmail.com --- Should I compile and run that testcase? Or is that just for when a proposed fix is developed so we can test it? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=45359 --- Comment #8 from Fabian Maurer <dark.shadow4(a)web.de> --- This is only as answer to
Is there an easy way to run the SHGetKnownFolderPath command manually myself? and for anyone who wants to test the issue. Only thing left is to make an actual fix.
-- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=45359 jaapbuurman(a)gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jaapbuurman(a)gmail.com -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=45359 --- Comment #9 from Matteo Bruni <matteo.mystral(a)gmail.com> --- (In reply to Fabian Maurer from comment #8)
This is only as answer to
Is there an easy way to run the SHGetKnownFolderPath command manually myself? and for anyone who wants to test the issue. Only thing left is to make an actual fix.
Isn't that what https://source.winehq.org/patches/data/147739 is about? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=45359 --- Comment #10 from Fabian Maurer <dark.shadow4(a)web.de> --- Yes indeed, didn't see that yet! -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=45359 --- Comment #11 from jaapbuurman(a)gmail.com --- That's a very fortunate coincidence! Does Wine work with nightlies by any chance that have this commit already included? Or would I have to compile it myself manually to test this? And in which release would this commit be included most likely? 3.11? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=45359 Fabian Maurer <dark.shadow4(a)web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Fixed by SHA1| |ff7c2c51718e8f64c9b708847f3 | |a322bd136eb75 Status|NEW |RESOLVED --- Comment #12 from Fabian Maurer <dark.shadow4(a)web.de> --- Yes, this is fixed in in wine-3.11 with https://source.winehq.org/git/wine.git/?a=commit;h=ff7c2c51718e8f64c9b708847... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=45359 --- Comment #13 from jaapbuurman(a)gmail.com --- Wine 3.11 just hit my distro's repository (Arch), and the bug is indeed fixed :) Kingdom Come now properly saves to the Saved Games folder and Steam is able to sync the save files. Thank you very much for patching this issue! -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=45359 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #14 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 3.12. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=45359 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |3.0.x -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=45359 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|3.0.x |--- --- Comment #15 from Michael Stefaniuc <mstefani(a)winehq.org> --- Removing the 3.0.x milestone from bugs included in 3.0.3. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=45359 Anastasius Focht <focht(a)gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |holzminister(a)t-online.de --- Comment #16 from Anastasius Focht <focht(a)gmx.net> --- *** Bug 45293 has been marked as a duplicate of this bug. *** -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org