Global: applies Copilot's suggestions

This commit is contained in:
李通洲
2026-03-06 18:22:44 +08:00
parent 1b702e123e
commit 53ffe8459f
5 changed files with 8 additions and 10 deletions
+1 -1
View File
@@ -18,7 +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[16];
wchar_t path[PATH_MAX];
GetSystemWindowsDirectoryW(path, ARRAY_SIZE(path)); // Loads from KernelBaseGlobalData, very fast
options->folders.chars[0] = (char) path[0];
ffStrbufAppendS(&options->folders, ":\\");