From fe314bd497f068031ed73d5d9e8227cbf72c5bf3 Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Mon, 22 Jun 2026 18:14:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=20`C:\Windows`=20=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E6=9D=A5=E6=B5=8B=E8=AF=95=E7=B3=BB=E7=BB=9F=20[GitHu?= =?UTF-8?q?b=20#361]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/xy.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/xy.h b/lib/xy.h index 7da82c42..717445aa 100644 --- a/lib/xy.h +++ b/lib/xy.h @@ -10,7 +10,7 @@ * | AnonTokio * | * Created On : <2023-08-28> - * Last Modified : <2026-03-21> + * Last Modified : <2026-06-22> * * * xy: 襄阳、咸阳 @@ -33,7 +33,7 @@ #ifndef XY_H #define XY_H -#define _XY_Version "v0.2.3.0-2026/03/21" +#define _XY_Version "v0.2.3.1-2026/06/22" #define _XY_Maintain_URL "https://github.com/RubyMetric/chsrc/blob/dev/lib/xy.h" #define _XY_Maintain_URL2 "https://gitee.com/RubyMetric/chsrc/blob/dev/lib/xy.h" @@ -1454,7 +1454,11 @@ _xy_detect_os () if (drive) { char path[256]; - snprintf (path, sizeof (path), "%s\\Users", drive); + /** + * C:\Users 目录都可能不存在! + * https://github.com/RubyMetric/chsrc/issues/361 + */ + snprintf (path, sizeof (path), "%s\\Windows", drive); DIR *d = opendir (path); if (d) {