From 00de991f6bc39c0f46d5124bddedd4e309829817 Mon Sep 17 00:00:00 2001 From: nytpu Date: Thu, 18 Mar 2021 11:36:05 -0600 Subject: [PATCH] Make sure datapath exists to prevent error --- comitium.go | 3 +++ 1 file changed, 3 insertions(+) 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)