[Bug 39811] New: GetLongPathName not working on case insensitive filesystems when short path is passed
https://bugs.winehq.org/show_bug.cgi?id=39811 Bug ID: 39811 Summary: GetLongPathName not working on case insensitive filesystems when short path is passed Product: Wine Version: 1.7.49 Hardware: x86 OS: Mac OS X Status: NEW Severity: normal Priority: P2 Component: ntdll Assignee: wine-bugs(a)winehq.org Reporter: piotr.caban(a)gmail.com When short path is passed to GetLongPathName on case insensitive file system (and it's not vfat) it will fail. So far I have only confirmed the issue on Mac (when both read_directory_getattrlist and read_directory_stat is used). But I think there will be similar problem if case insensitive FS is used on Linux. It's a regression that breaks some functionality in Quicken 2013. It's caused by following commits: - read_directory_getattrlist: 5c98448aa3acb9bac40a0afa28ffbee3001081d0 - read_directory_stat: 2f0febe60a9f0b29840fc8d60679a8585b788ad5 Steps to reproduce the problem (on case insensitive file system): touch ~/.wine/drive_c/somelongname char short_path[256], path2[256]; printf("%x\n", GetShortPathNameA("c:\\somelongname", path, sizeof(path))); printf("%s\n", path); printf("%x\n", GetLongPathNameA(path, path2, sizeof(path2)); printf("%s\n", path2); Output: b c:\SOME~LJ0 0 Correct output will be following: b c:\SOME~LJ0 f c:\somelongname -- 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=39811 Piotr Caban <piotr.caban(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |2f0febe60a9f0b29840fc8d6067 | |9a8585b788ad5 -- 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=39811 Piotr Caban <piotr.caban(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression -- 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=39811 Piotr Caban <piotr.caban(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ken(a)codeweavers.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=39811 Piotr Caban <piotr.caban(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matteo.mystral(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=39811 --- Comment #1 from Piotr Caban <piotr.caban(a)gmail.com> --- Probably a correct solution is to revert Ken's patch and remove "else if (!case_sensitive && ret && (errno == ENOENT || errno == ENOTDIR))" block from Matteo's patch but I'll leave it to patch authors. -- 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=39811 --- Comment #2 from Matteo Bruni <matteo.mystral(a)gmail.com> --- (In reply to Piotr Caban from comment #1)
Probably a correct solution is to revert Ken's patch and remove "else if (!case_sensitive && ret && (errno == ENOENT || errno == ENOTDIR))" block from Matteo's patch but I'll leave it to patch authors.
That seems like a sensible solution. I would also add some tests to both NtQueryDirectoryFiles and GetLongPathName. Actually if I'm not mistaken there is already a test for GetLongPathName which would regress with these patches... -- 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=39811 --- Comment #3 from Piotr Caban <piotr.caban(a)gmail.com> --- (In reply to Matteo Bruni from comment #2)
Actually if I'm not mistaken there is already a test for GetLongPathName which would regress with these patches... Yes, there are already GetLongPathName tests that regress because of the patches (in kernel32->path tests).
-- 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=39811 --- Comment #4 from Ken Thomases <ken(a)codeweavers.com> --- The suggested fix is OK with me. After release, we might try putting in a test for the name matching the pattern of a short name and, if it doesn't, returning STATUS_NO_MORE_FILES. Obviously, we'll have to be much more careful with the testing this time around. :( -- 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=39811 Piotr Caban <piotr.caban(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |a8ef26149308f577151f14a2d35 | |9868754c7ea20 Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #5 from Piotr Caban <piotr.caban(a)gmail.com> --- It works for me now. Marking as fixed. -- 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=39811 Michael Stefaniuc <mstefani(a)redhat.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mstefani(a)redhat.com Target Milestone|--- |1.8.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=39811 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #6 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 1.9.0. -- 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=39811 Michael Stefaniuc <mstefani(a)redhat.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|1.8.x |--- --- Comment #7 from Michael Stefaniuc <mstefani(a)redhat.com> --- Removing 1.8.x milestone from bugs included in 1.8.1. -- 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