mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
use mtime instead of ctime for backups #4321
This commit is contained in:
parent
5115b33446
commit
5163e50e7d
@ -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}` : ''}`));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -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};
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user