[4/4] msi/tests: Fix package test when run on a different drive than C:\.
James Hawkins
truiken at gmail.com
Tue Apr 21 16:39:36 CDT 2009
On Tue, Apr 21, 2009 at 2:30 PM, Nicolas Le Cam <niko.lecam at gmail.com> wrote:
> This one finally fixes current relative path test to expect correct
> value.
>
+ drives = GetLogicalDrives();
+ lstrcpyA(path, "A:\\");
+ for (i = 0; i < 26; path[0] = '\0', i++)
+ {
+ if (!(drives & (1 << i)))
+ continue;
+
+ path[0] = 'A' + i;
+ if (GetDriveType(path) != DRIVE_FIXED)
+ continue;
+
+ lstrcatA(path + 3, CURR_DIR + 3);
+ attr = GetFileAttributesA(path);
+ if (attr != INVALID_FILE_ATTRIBUTES && (attr &
FILE_ATTRIBUTE_DIRECTORY))
+ {
+ if (path[lstrlenA(path)-1] != '\\')
+ lstrcatA(path, "\\");
+ break;
+ }
+ path[3] = '\0';
+ }
Same as 2/4. Please refactor and add many nice comments detailing
exactly what is happening in native msi to make this necessary.
--
James Hawkins
More information about the wine-devel
mailing list