From 3fe3412410fc84a1f8a8f2885796de5f54068fdd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BE=99=E8=85=BE=E7=8C=AB=E8=B7=83?= <1043137532@qq.com>
Date: Mon, 4 May 2026 09:38:58 +0800
Subject: [PATCH] *
---
Shared/Utils/DirectoryUtils.cs | 1 +
Shared/Utils/PathUtils.cs | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/Shared/Utils/DirectoryUtils.cs b/Shared/Utils/DirectoryUtils.cs
index 48fbaec..c472731 100644
--- a/Shared/Utils/DirectoryUtils.cs
+++ b/Shared/Utils/DirectoryUtils.cs
@@ -32,6 +32,7 @@ public static class DirectoryUtils {
///
/// 返回指定路径下的所有文件夹。
+ /// 路径不以分隔符结尾。
///
public static IEnumerable EnumerateDirectories(string path, string searchPattern = "*", bool topDirectoryOnly = false) {
if (!Exists(path)) return [];
diff --git a/Shared/Utils/PathUtils.cs b/Shared/Utils/PathUtils.cs
index b97d8fe..647c27b 100644
--- a/Shared/Utils/PathUtils.cs
+++ b/Shared/Utils/PathUtils.cs
@@ -26,7 +26,7 @@ public static class PathUtils {
/// 若路径较长,则尽量将其转换为短路径。
/// 若输入的是文件夹路径,不保证其结尾是否有文件夹分隔符。
///
- public static string Shorten(string fullName, bool keepFileName = false) {
+ public static string ToShortPath(string fullName, bool keepFileName = false) {
if (string.IsNullOrEmpty(fullName) || fullName.Length <= 200) return fullName;
fullName = fullName.Replace('/', '\\');