提交 f2510fe8 authored 作者: Thomas Mueller's avatar Thomas Mueller

File system abstraction: support replacing existing files using move (currently not for Windows).

上级 f116187d
...@@ -239,7 +239,7 @@ public class TraceSystem implements TraceWriter { ...@@ -239,7 +239,7 @@ public class TraceSystem implements TraceWriter {
if (maxFileSize > 0 && FileUtils.size(fileName) > maxFileSize) { if (maxFileSize > 0 && FileUtils.size(fileName) > maxFileSize) {
String old = fileName + ".old"; String old = fileName + ".old";
FileUtils.delete(old); FileUtils.delete(old);
FileUtils.moveTo(fileName, old); FileUtils.move(fileName, old);
} }
} }
if (!openWriter()) { if (!openWriter()) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论