summaryrefslogtreecommitdiff
path: root/comitium.go
diff options
context:
space:
mode:
authornytpu <alex@nytpu.com>2021-03-18 11:36:05 -0600
committernytpu <alex@nytpu.com>2021-03-18 11:36:05 -0600
commit00de991f6bc39c0f46d5124bddedd4e309829817 (patch)
treefd2991155b5b7bb0b002a446b2b7162cb248a0e8 /comitium.go
parent853993cdd6f874896d2982401a695cb82e2e6ecc (diff)
Make sure datapath exists to prevent error
Diffstat (limited to 'comitium.go')
-rw-r--r--comitium.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/comitium.go b/comitium.go
index 9a8bae6..5e0c6f3 100644
--- a/comitium.go
+++ b/comitium.go
@@ -48,6 +48,9 @@ func main() {
// dataPath is the location where all the data (list of subs, cached hashes,
// etcetera) are stored
dataPath := getDataPath()
+ // make sure it exists so we can start working with files in it
+ os.MkdirAll(dataPath, os.ModePerm)
+
err := core.Init(dataPath)
if err != nil {
fmt.Fprintf(os.Stderr, "Error in initialization: %v\n", err)