wiki-server 0.22.1 → 0.22.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/page.coffee +9 -2
- package/package.json +1 -1
package/lib/page.coffee
CHANGED
|
@@ -338,11 +338,18 @@ module.exports = exports = (argv) ->
|
|
|
338
338
|
cb null, sitemap.filter (item) -> if item? then true
|
|
339
339
|
|
|
340
340
|
itself.slugs = (cb) ->
|
|
341
|
-
fs.readdir argv.db, (e, files) ->
|
|
341
|
+
fs.readdir argv.db, {withFileTypes: true}, (e, files) ->
|
|
342
342
|
if e
|
|
343
343
|
console.log 'Problem reading pages directory', e
|
|
344
344
|
cb(e)
|
|
345
345
|
else
|
|
346
|
-
|
|
346
|
+
onlyFiles = files.map((i) ->
|
|
347
|
+
if i.isFile()
|
|
348
|
+
return i.name
|
|
349
|
+
else
|
|
350
|
+
return null
|
|
351
|
+
).filter((i) ->
|
|
352
|
+
i != null && !i?.startsWith('.'))
|
|
353
|
+
cb(null, onlyFiles)
|
|
347
354
|
|
|
348
355
|
itself
|