*
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user