use mtime instead of ctime for backups #4321

This commit is contained in:
zadam 2023-10-19 23:02:37 +02:00
parent 5115b33446
commit 5163e50e7d
2 changed files with 4 additions and 4 deletions

View File

@ -84,11 +84,11 @@ export default class BackupOptions extends OptionsWidget {
this.$existingBackupList.empty();
if (!backupFiles.length) {
backupFiles = [{filePath: "no backup yet", ctime: ''}];
backupFiles = [{filePath: "no backup yet", mtime: ''}];
}
for (const {filePath, ctime} of backupFiles) {
this.$existingBackupList.append($("<li>").text(`${filePath} ${ctime ? ` - ${ctime}` : ''}`));
for (const {filePath, mtime} of backupFiles) {
this.$existingBackupList.append($("<li>").text(`${filePath} ${mtime ? ` - ${mtime}` : ''}`));
}
});
}

View File

@ -21,7 +21,7 @@ function getExistingBackups() {
const filePath = path.resolve(dataDir.BACKUP_DIR, fileName);
const stat = fs.statSync(filePath)
return {fileName, filePath, ctime: stat.ctime};
return {fileName, filePath, mtime: stat.mtime};
});
}