Disk: moves disk hiding by folder and FS type to detection code

Don't probe if hided

Fixes #2043
This commit is contained in:
李通洲
2025-11-06 13:39:30 +08:00
parent 7638e0e4a1
commit 645bf5c839
8 changed files with 85 additions and 45 deletions
+6
View File
@@ -27,6 +27,12 @@ const char* ffDetectDisksImpl(FFDiskOptions* options, FFlist* disks)
continue;
}
if (options->hideFolders.length && ffDiskMatchesFolderPatterns(&options->hideFolders, path.Path(), FF_DISK_FOLDER_SEPARATOR))
continue;
if (options->hideFS.length && ffStrbufSeparatedContainS(&options->hideFS, fs.fsh_name, ':'))
continue;
FFDisk* disk = (FFDisk*) ffListAdd(disks);
disk->bytesTotal = (uint64_t)fs.total_blocks * (uint64_t) fs.block_size;