mirror of
https://github.com/snowykami/server-status-client.git
synced 2025-02-22 02:26:06 +08:00
修复macOS挂载点检查逻辑,确保正确处理系统和应用程序目录
This commit is contained in:
parent
90b4952ea9
commit
7ee3eb377e
@ -17,6 +17,11 @@ excluded_partition_prefix = (
|
||||
"/dev",
|
||||
"/tmp",
|
||||
"/snap",
|
||||
|
||||
"/System",
|
||||
"/Applications",
|
||||
"/private",
|
||||
"/Library",
|
||||
)
|
||||
|
||||
include_partition_prefix_mac = ("/Volumes")
|
||||
@ -214,21 +219,13 @@ class Client:
|
||||
|
||||
if (
|
||||
(
|
||||
platform.system() == "Linux"
|
||||
platform.system() in ("Linux", "Darwin")
|
||||
and (
|
||||
part.mountpoint.startswith(
|
||||
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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user