mirror of
https://github.com/snowykami/server-status-client.git
synced 2025-06-06 04:35:22 +00:00
修复macOS挂载点检查逻辑,确保正确处理系统和应用程序目录
This commit is contained in:
parent
90b4952ea9
commit
7ee3eb377e
@ -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
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user