修复macOS挂载点检查逻辑,确保正确处理系统和应用程序目录
Some checks failed
Compile / build (x64, windows-latest) (push) Failing after 21s
Compile / build (x64, ubuntu-latest) (push) Failing after 2m43s

This commit is contained in:
远野千束 2024-12-10 13:14:10 +08:00
parent 90b4952ea9
commit 7ee3eb377e

View File

@ -17,6 +17,11 @@ excluded_partition_prefix = (
"/dev", "/dev",
"/tmp", "/tmp",
"/snap", "/snap",
"/System",
"/Applications",
"/private",
"/Library",
) )
include_partition_prefix_mac = ("/Volumes") include_partition_prefix_mac = ("/Volumes")
@ -214,21 +219,13 @@ class Client:
if ( if (
( (
platform.system() == "Linux" platform.system() in ("Linux", "Darwin")
and ( and (
part.mountpoint.startswith( part.mountpoint.startswith(
excluded_partition_prefix excluded_partition_prefix
) )
) )
) )
or
(
platform.system() == "Darwin"
and ((not part.mountpoint.startswith(
include_partition_prefix_mac
)) or not part.mountpoint == "/")
)
or usage.total == 0
): ):
continue continue