Skip to content

Commit a240753

Browse files
ohtakeseki yohei
authored andcommitted
fixup! Restore timestamp from database files
1 parent 979c609 commit a240753

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/server/LevelDBLib.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default class LevelDBLib {
4242
const pages = getDirectories(path).map(p => LevelDBLib.unescapeNamespace(p.split(sep)[1]));
4343
return pages.reduce((accumulator, p) => {
4444
const dbPath = join(path, LevelDBLib.escapeNamespace(p));
45-
const directoryCreated = lstatSync(dbPath).mtime;
45+
const directoryCreated = lstatSync(dbPath).ctime; // Not correct on Linux
4646
const latestFileModified = new Date(Math.max(...readdirSync(dbPath).map(name => join(dbPath, name)).map(f => lstatSync(f).mtimeMs)));
4747
return Object.assign(accumulator, {
4848
[p]: {

0 commit comments

Comments
 (0)