mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-07-23 07:00:49 -04:00
Add prefix to backup dir
This commit is contained in:
parent
bc734fe51b
commit
8d8318a73a
1 changed files with 4 additions and 1 deletions
|
@ -23,7 +23,10 @@ public class FileUtil {
|
||||||
|
|
||||||
File origFile = new File(Paths.get(dir.getAbsolutePath(), fileName).toString());
|
File origFile = new File(Paths.get(dir.getAbsolutePath(), fileName).toString());
|
||||||
if (origFile.exists()) {
|
if (origFile.exists()) {
|
||||||
File backupFileDir = new File(Paths.get(backupDir.getAbsolutePath(), fileName.replace(".", "_")).toString());
|
String dirName = "backups_" + fileName;
|
||||||
|
if (dirName.contains("."))
|
||||||
|
dirName = dirName.replace(".", "_");
|
||||||
|
File backupFileDir = new File(Paths.get(backupDir.getAbsolutePath(), dirName).toString());
|
||||||
if (!backupFileDir.exists())
|
if (!backupFileDir.exists())
|
||||||
if (!backupFileDir.mkdir())
|
if (!backupFileDir.mkdir())
|
||||||
log.warn("make backupFileDir failed");
|
log.warn("make backupFileDir failed");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue