mirror of
https://github.com/snowykami/server-status-client.git
synced 2025-01-20 01:08:20 +08:00
修复macOS分区监控逻辑,确保正确处理挂载点
This commit is contained in:
parent
e74324e21b
commit
0559212d03
@ -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
|
||||||
):
|
):
|
||||||
|
Loading…
Reference in New Issue
Block a user