From cb6beca067b83f921f5d2bba65174b2c9b857bda Mon Sep 17 00:00:00 2001 From: qinglong Date: Sun, 14 Jun 2026 10:02:09 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"fix:=20Windows=E5=88=86=E5=8C=BA?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E5=90=8D=20=E2=80=94=20=E7=94=A8=E7=9B=98?= =?UTF-8?q?=E7=AC=A6(C:)=E6=9B=BF=E4=BB=A3=E8=AE=BE=E5=A4=87=E8=B7=AF?= =?UTF-8?q?=E5=BE=84"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 7cdae4d954370496e7815a3f4db3b7cfec2fcebb. --- services/web_panel/utils/system_info.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/services/web_panel/utils/system_info.py b/services/web_panel/utils/system_info.py index d654c1e..ae16f87 100644 --- a/services/web_panel/utils/system_info.py +++ b/services/web_panel/utils/system_info.py @@ -154,12 +154,8 @@ class SystemInfoCollector: continue try: usage = self.psutil.disk_usage(p.mountpoint) - # Windows: 用盘符作为设备名 (C:, D:) - dev = p.device - if os.name == 'nt': - dev = p.mountpoint.rstrip('\\') # C:\ → C: parts.append({ - "device": dev, + "device": p.device, "mount": p.mountpoint, "fstype": p.fstype or "", "total_gb": round(usage.total / 1073741824, 1), @@ -167,11 +163,8 @@ class SystemInfoCollector: "percent": usage.percent, }) except (PermissionError, OSError): - dev = p.device - if os.name == 'nt': - dev = p.mountpoint.rstrip('\\') parts.append({ - "device": dev, + "device": p.device, "mount": p.mountpoint, "fstype": p.fstype or "", "total_gb": 0, "used_gb": 0, "percent": 0,