fix: not starting without a config file

Massimo Melina committed Feb 8, 2022 at 00:16 UTC f5680411ea9f92c847eda120ebd55bfd8d95b17a
3 files changed +2 -3
package.json
+1 -1
@@ -1,6 +1,6 @@
1 {
2 "name": "hfs",
3 - "version": "0.9.0",
3 + "version": "0.9.1",
4 "description": "HTTP File Server",
5 "keywords": [
6 "file server",
src/watchLoad.ts
+1 -1
@@ -40,7 +40,7 @@ export function watchLoad(path:string, parser:(data:any)=>void|Promise<void>, {
40 if (path.endsWith('.yaml'))
41 data = yaml.parse(data)
42 } catch (e) {
43 - if (initDone)
43 + if (!initDone)
44 failOnFirstAttempt?.()
45 doing = false
46 console.debug('cannot read', path, String(e))
todo.md
-1
@@ -1,5 +1,4 @@
1 # To do
2 -- start without config file
2 - allowed referer
3 - admin/plugins
4 - log rotation