*
This commit is contained in:
1 parent
52290ece97
commit
2a954ba52f
3 files changed
+15
-12
No files matched your search
@@ -188,7 +188,7 @@ public static class FileUtils {
|
||||
if (string.CompareOrdinal(sourceFilePath, destFilePath) == 0) {
|
||||
// 复制自身到自身,则不执行操作
|
||||
Logger.Trace($"复制文件到自身,不执行操作:{sourceFilePath} → {destFilePath}");
|
||||
} else if (string.Compare(sourceFilePath, destFilePath, StringComparison.OrdinalIgnoreCase) == 0) {
|
||||
} else if (PathUtils.IsSame(sourceFilePath, destFilePath)) {
|
||||
// 路径仅大小写不同,等效于重命名
|
||||
Logger.Trace($"复制文件到自身,但大小写不同,等效于重命名文件:{sourceFilePath} → {destFilePath}");
|
||||
FileUtils.Move(sourceFilePath, destFilePath);
|
||||
@@ -213,7 +213,7 @@ public static class FileUtils {
|
||||
if (string.CompareOrdinal(sourceFilePath, destFilePath) == 0) {
|
||||
// 剪切自身到自身,则不执行操作
|
||||
Logger.Trace($"剪切文件到自身,不执行操作:{sourceFilePath} → {destFilePath}");
|
||||
} else if (string.Compare(sourceFilePath, destFilePath, StringComparison.OrdinalIgnoreCase) == 0) {
|
||||
} else if (PathUtils.IsSame(sourceFilePath, destFilePath)) {
|
||||
// 路径仅大小写不同
|
||||
Logger.Trace($"剪切文件到自身,但大小写不同:{sourceFilePath} → {destFilePath}");
|
||||
Retrier.Attempt(delay: _ => TimeSpan.FromMilliseconds(200), isRetryAllowed: ex => ex is IOException, action: _ => {
|
||||
|
||||
Reference in new issue
Block a user