Hi,
I've just submitted a patch to fix this bug, #19045. This issue is caused by
commit f7e6777e6e19ca3be4b84f98baf22ef53ab19f96
Author: Guy Albertelli <[email protected]>
Date: 29.04.2009 03:08:22
Follows: wine-1.1.20 (Release 1.1.20.)
kernel32: Fix GetVolumeInformation[AW] to require trailing \.
I spotted three places where I added a trailing \ (one of them obviously in
winecfg).
However, there are more calls to GetVolumeInformation in the source. They need
a review because it was not obvious to me whether they supplied the required
trailing backslash, e.g.
int21.c:3234 /* LONG FILENAME - GET VOLUME INFORMATION */
... see below
Others, like in shell32/shellpath.c are just pass-through, so the callers need
be reviewed.
So I invite interested parties to check the calls to GetVolumeInformation in
the wine source to assess whether the callers provide the \.
Otherwise, please submit a patch.
In the annoated output of grep below, "pass" means pass-through; "review"
please; and "ok" means I found the code to be either fine or fixed by my patch.
pass ./dlls/msi/media.c:56: if (!GetVolumeInformationW(source_root,
volume_name, MAX_PATH + 1,
review ./dlls/shell32/shfldr_mycomp.c:711:
GetVolumeInformationW (pszPath, wszDrive,
pass ./dlls/shell32/shellpath.c:453: if (!GetVolumeInformationA(lpszPath,
NULL, 0, NULL, &fnlen, NULL, NULL, 0))
pass ./dlls/shell32/shellpath.c:465: if (!GetVolumeInformationW(lpszPath,
NULL, 0, NULL, &fnlen, NULL, NULL, 0))
pass ./dlls/user32/network.c:194: GetVolumeInformationA( lpLocalName,
label, sizeof(label), NULL, NULL, NULL, NULL, 0 );
ok ./dlls/winedos/int21.c:2608:
GetVolumeInformationW(drivespec, label, 12, &serial, NULL, NULL, fsname, 9);
review ./dlls/winedos/int21.c:3234: if (!GetVolumeInformationW(
pathW, NULL, 0, NULL, &filename_len,
ok ./dlls/winedos/int21.c:3426: if (!GetVolumeInformationW( path,
label, 11, &serial, NULL, NULL, NULL, 0))
ok ./dlls/winedos/int21.c:3884: if (!GetVolumeInformationW(path,
entry->cAlternateFileName, 13, NULL, NULL, NULL, NULL, 0)) return 0;
ok ./dlls/kernel32/tests/volume.c:... tests assumed ok
./dlls/kernel32/volume.c:507:BOOL WINAPI GetVolumeInformationW( LPCWSTR
root, LPWSTR label, DWORD label_len,
./dlls/kernel32/volume.c:628:BOOL WINAPI GetVolumeInformationA( LPCSTR
root, LPSTR label,
ok ./dlls/kernel32/volume.c:642: if ((ret =
GetVolumeInformationW(rootW, labelW, label_len, serial,
ok ./dlls/shell32/shelllink.c:2154: r = GetVolumeInformationW(drive,
volume->label, label_sz,
ok ./programs/cmd/builtins.c:2482: status = GetVolumeInformation (NULL,
label, sizeof(label)/sizeof(WCHAR),
ok ./programs/cmd/builtins.c:2492: status = GetVolumeInformation
(curdir, label, sizeof(label)/sizeof(WCHAR),
ok ./programs/winefile/winefile.c:1402: GetVolumeInformation(drv,
root->volname, _MAX_FNAME, 0, 0, &root->fs_flags, root->fs, _MAX_DIR);
ok ./programs/winecfg/drive.c:287: if (!GetVolumeInformationW(
root, volname, sizeof(volname)/sizeof(WCHAR),
Regards,
Jörg Höhle