File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -39,13 +39,13 @@ export default class LevelDBLib {
39
39
}
40
40
} ;
41
41
const getDirectories = source => ( isDirectory ( source ) ? readdirSync ( source ) . map ( name => join ( source , name ) ) . filter ( isDirectory ) : [ ] ) ;
42
- const dirs = getDirectories ( path ) . map ( p => LevelDBLib . unescapeNamespace ( p . split ( sep ) [ 1 ] ) ) ;
43
- return dirs . reduce ( ( accumulator , d ) => {
44
- const dbPath = join ( path , d ) ;
42
+ const pages = getDirectories ( path ) . map ( p => LevelDBLib . unescapeNamespace ( p . split ( sep ) [ 1 ] ) ) ;
43
+ return pages . reduce ( ( accumulator , p ) => {
44
+ const dbPath = join ( path , LevelDBLib . escapeNamespace ( p ) ) ;
45
45
const directoryCreated = lstatSync ( dbPath ) . mtime ;
46
46
const latestFileModified = new Date ( Math . max ( ...readdirSync ( dbPath ) . map ( name => join ( dbPath , name ) ) . map ( f => lstatSync ( f ) . mtimeMs ) ) ) ;
47
47
return Object . assign ( accumulator , {
48
- [ d ] : {
48
+ [ p ] : {
49
49
created : directoryCreated ,
50
50
modified : latestFileModified ,
51
51
active : 0 ,
You can’t perform that action at this time.
0 commit comments