REFIT_FILE File;
CHAR16 **TokenList;
CHAR16 *FlagName;
+ CHAR16 *SelfPath = NULL;
UINTN TokenCount, i;
// Set a few defaults only if we're loading the default file.
// MyFreePool(GlobalConfig.DontScanVolumes);
// GlobalConfig.DontScanVolumes = StrDuplicate(L" ");
MyFreePool(GlobalConfig.DontScanDirs);
- GlobalConfig.DontScanDirs = StrDuplicate(SelfDirPath);
+ if (SelfVolume->VolName) {
+ SelfPath = StrDuplicate(SelfVolume->VolName);
+ } else {
+ SelfPath = AllocateZeroPool(256 * sizeof(CHAR16));
+ SPrint(SelfPath, 255, L"fs%d", SelfVolume->VolNumber);
+ } // if/else
+ MergeStrings(&SelfPath, SelfDirPath, L':');
+ GlobalConfig.DontScanDirs = SelfPath;
MyFreePool(GlobalConfig.DontScanFiles);
GlobalConfig.DontScanFiles = StrDuplicate(DONT_SCAN_FILES);
}
} else if ((StriCmp(TokenList[0], L"don't_scan_volumes") == 0) || (StriCmp(TokenList[0], L"dont_scan_volumes") == 0)) {
HandleStrings(TokenList, TokenCount, &(GlobalConfig.AlsoScan));
// Note: Don't use HandleStrings() because it modifies slashes, which might be present in volume name
- MyFreePool(GlobalConfig.DontScanVolumes);
- GlobalConfig.DontScanVolumes = NULL;
- for (i = 1; i < TokenCount; i++) {
- MergeStrings(&GlobalConfig.DontScanVolumes, TokenList[i], L',');
- }
+ MyFreePool(GlobalConfig.DontScanVolumes);
+ GlobalConfig.DontScanVolumes = NULL;
+ for (i = 1; i < TokenCount; i++) {
+ MergeStrings(&GlobalConfig.DontScanVolumes, TokenList[i], L',');
+ }
} else if ((StriCmp(TokenList[0], L"don't_scan_dirs") == 0) || (StriCmp(TokenList[0], L"dont_scan_dirs") == 0)) {
HandleStrings(TokenList, TokenCount, &(GlobalConfig.DontScanDirs));