mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-09 23:22:16 -04:00
Fix wrong dir path for pruning rolling backup files
This commit is contained in:
parent
83f03e75da
commit
4cb2ce91df
1 changed files with 4 additions and 1 deletions
|
@ -36,7 +36,7 @@ public class FileUtil {
|
||||||
try {
|
try {
|
||||||
Files.copy(origFile, backupFile);
|
Files.copy(origFile, backupFile);
|
||||||
|
|
||||||
pruneBackup(backupDir);
|
pruneBackup(backupFileDir);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error("Backup key failed " + e.getMessage());
|
log.error("Backup key failed " + e.getMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -55,6 +55,9 @@ public class FileUtil {
|
||||||
if (file.isFile()) {
|
if (file.isFile()) {
|
||||||
if (!file.delete())
|
if (!file.delete())
|
||||||
log.error("Failed to delete file: " + file);
|
log.error("Failed to delete file: " + file);
|
||||||
|
else
|
||||||
|
pruneBackup(backupDir);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
pruneBackup(new File(Paths.get(backupDir.getAbsolutePath(), file.getName()).toString()));
|
pruneBackup(new File(Paths.get(backupDir.getAbsolutePath(), file.getName()).toString()));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue