From 0559212d0328ff442c75d138051ccbb5192cdca4 Mon Sep 17 00:00:00 2001 From: Snowykami Date: Tue, 10 Dec 2024 13:07:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DmacOS=E5=88=86=E5=8C=BA?= =?UTF-8?q?=E7=9B=91=E6=8E=A7=E9=80=BB=E8=BE=91=EF=BC=8C=E7=A1=AE=E4=BF=9D?= =?UTF-8?q?=E6=AD=A3=E7=A1=AE=E5=A4=84=E7=90=86=E6=8C=82=E8=BD=BD=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server_status/api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server_status/api.py b/server_status/api.py index 5abec93..8ab69ca 100644 --- a/server_status/api.py +++ b/server_status/api.py @@ -19,7 +19,7 @@ excluded_partition_prefix = ( "/snap", ) -include_partition_prefix_mac = ("/Volumes",) +include_partition_prefix_mac = ("/Volumes") os_name = "" # linux下为发行版名称,windows下为Windows, macOS下为Darwin os_version = "" # linux下为发行版版本,windows下为Windows版本 @@ -224,9 +224,9 @@ class Client: or ( platform.system() == "Darwin" - and not part.mountpoint.startswith( + and (not part.mountpoint.startswith( include_partition_prefix_mac - ) + ) or part.mountpoint == "/") ) or usage.total == 0 ):