ref: PathUtils.RemoveFileName

This commit is contained in:
龙腾猫跃 committed 2026-05-07 10:23:17 +08:00
1 parent 6bce8a6515
commit b26e2c77e6
3 files changed
+29 -15

No files matched your search

+1 -1
View File
@@ -6,7 +6,7 @@ public static class DirectoryUtils {
/// 文件夹已存在时不会抛出异常。
/// </summary>
public static void Create(string path, bool isFilePath = false) {
if (isFilePath) path = Path.GetDirectoryName(path);
if (isFilePath) path = PathUtils.RemoveFileName(path);
if (Exists(path)) return;
Logger.Trace($"新建文件夹:{path}");
path = PathUtils.WithLongPath(path);