mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:14:37 +02:00
Disk (Windows): reads SystemWindowsDirectory directly from SharedUserData
This commit is contained in:
@@ -18,9 +18,7 @@ const char* ffDetectDisksImpl(FFDiskOptions* options, FFlist* disks)
|
||||
// For cross-platform portability; used by `presets/examples/13.jsonc`
|
||||
if (options->folders.length == 1 && options->folders.chars[0] == '/')
|
||||
{
|
||||
wchar_t path[PATH_MAX];
|
||||
GetSystemWindowsDirectoryW(path, ARRAY_SIZE(path)); // Loads from KernelBaseGlobalData, very fast
|
||||
options->folders.chars[0] = (char) path[0];
|
||||
options->folders.chars[0] = (char) SharedUserData->NtSystemRoot[0];
|
||||
ffStrbufAppendS(&options->folders, ":\\");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user