*
This commit is contained in:
1 parent
2a954ba52f
commit
d4a98babd3
3 files changed
+3
-3
No files matched your search
@@ -384,7 +384,7 @@ public static class FileUtils {
|
||||
compressionFile = PathUtils.ForApi(compressionFile);
|
||||
DirectoryUtils.Create(outputDirectory);
|
||||
// 解压 gz(gz 不需要考虑编码)
|
||||
if (compressionFile.EndsWithF(".gz", true)) {
|
||||
if (PathUtils.GetExtension(compressionFile) == "gz") {
|
||||
string outFilePath = Path.Combine(outputDirectory, PathUtils.GetFileNameWithoutExtension(compressionFile));
|
||||
Logger.Trace($"解压 gz 文件:{compressionFile} → {outFilePath}");
|
||||
using var fileStream = FileUtils.ReadAsStream(compressionFile);
|
||||
|
||||
@@ -265,7 +265,7 @@ public static class PathUtils {
|
||||
public static bool IsParentOf(string parentPath, string childPath) {
|
||||
parentPath = PathUtils.ForCompare(parentPath);
|
||||
childPath = PathUtils.ForCompare(childPath);
|
||||
return childPath.StartsWithF(parentPath + @"\") || PathUtils.IsSame(childPath, parentPath);
|
||||
return childPath.StartsWithF(parentPath + @"\", true) || PathUtils.IsSame(childPath, parentPath);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ public static class Dialogs {
|
||||
Logger.Info($"保存弹窗返回:{result}");
|
||||
if (!result.Contains(Path.DirectorySeparatorChar)) return null;
|
||||
// AddExtension 可能失效,需要手动补全(#8214)
|
||||
if (filters != null && !string.IsNullOrEmpty(result) && !filters.Any(f => result.EndsWithF("." + f.Extension))) {
|
||||
if (filters != null && !string.IsNullOrEmpty(result) && !filters.Any(f => result.EndsWithF("." + f.Extension, true))) {
|
||||
result += "." + filters[dialog.FilterIndex - 1].Extension;
|
||||
Logger.Warn($"选择文件的返回无扩展名,将会手动添加,修改后为:{result}");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user