Skip to content

Commit d09258d

Browse files
committed
GetDefaultRecordKey() 支持非 Windows 操作系统
1 parent c95303d commit d09258d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Qiniu/Storage/ResumeHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static string GetDefaultRecordKey(string localFile, string key)
2222
string tempDir = System.Environment.GetEnvironmentVariable("TEMP");
2323
System.IO.FileInfo fileInfo = new System.IO.FileInfo(localFile);
2424
string uniqueKey = string.Format("{0}:{1}:{2}", localFile, key, fileInfo.LastWriteTime.ToFileTime());
25-
return string.Format("{0}\\{1}",tempDir,"QiniuResume_" + Hashing.CalcMD5X(uniqueKey));
25+
return Path.Combine(tempDir, "QiniuResume_" + Hashing.CalcMD5X(uniqueKey));
2626
}
2727

2828
/// <summary>
@@ -71,4 +71,4 @@ public static void Save(ResumeInfo resumeInfo, string recordFile)
7171
}
7272
}
7373
}
74-
}
74+
}

0 commit comments

Comments
 (0)