On Tue, Apr 21, 2009 at 2:30 PM, Nicolas Le Cam niko.lecam@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.