forked from github/dataease
Merge pull request #2659 from dataease/pr@dev@perf_move_map_file
perf(仪表板): 复制地图坐标文件判断是否已存在
This commit is contained in:
commit
bfacd16d08
@ -85,7 +85,10 @@ public class MapTransferService {
|
||||
files.forEach(file -> {
|
||||
String fileName = file.getName();
|
||||
String newFilePath = dirPath + GLOBAL_CHINA_PREFIX + FILE_SEPARATOR + GLOBAL_CHINA_PREFIX + fileName;
|
||||
FileUtil.move(file, new File(newFilePath), false);
|
||||
File target = new File(newFilePath);
|
||||
if(!target.exists()) {
|
||||
FileUtil.move(file, target, true);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -104,8 +107,10 @@ public class MapTransferService {
|
||||
String targetPath = targetDirPath + fileName;
|
||||
|
||||
File targetFile = new File(targetPath);
|
||||
if (!targetFile.exists()) {
|
||||
FileUtil.move(sourceFile, targetFile, true);
|
||||
}
|
||||
|
||||
FileUtil.move(sourceFile, targetFile, false);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user