修复macOS分区监控逻辑,确保正确处理挂载点
Some checks failed
Compile / build (x64, windows-latest) (push) Failing after 45s
Compile / build (x64, ubuntu-latest) (push) Failing after 2m39s

This commit is contained in:
远野千束(神羽) 2024-12-10 13:07:01 +08:00
parent e74324e21b
commit 0559212d03

View File

@ -19,7 +19,7 @@ excluded_partition_prefix = (
"/snap", "/snap",
) )
include_partition_prefix_mac = ("/Volumes",) include_partition_prefix_mac = ("/Volumes")
os_name = "" # linux下为发行版名称windows下为Windows macOS下为Darwin os_name = "" # linux下为发行版名称windows下为Windows macOS下为Darwin
os_version = "" # linux下为发行版版本windows下为Windows版本 os_version = "" # linux下为发行版版本windows下为Windows版本
@ -224,9 +224,9 @@ class Client:
or or
( (
platform.system() == "Darwin" platform.system() == "Darwin"
and not part.mountpoint.startswith( and (not part.mountpoint.startswith(
include_partition_prefix_mac include_partition_prefix_mac
) ) or part.mountpoint == "/")
) )
or usage.total == 0 or usage.total == 0
): ):