diff options
| author | nytpu <alex@nytpu.com> | 2021-03-18 11:36:05 -0600 |
|---|---|---|
| committer | nytpu <alex@nytpu.com> | 2021-03-18 11:36:05 -0600 |
| commit | 00de991f6bc39c0f46d5124bddedd4e309829817 (patch) | |
| tree | fd2991155b5b7bb0b002a446b2b7162cb248a0e8 | |
| parent | 853993cdd6f874896d2982401a695cb82e2e6ecc (diff) | |
Make sure datapath exists to prevent error
| -rw-r--r-- | comitium.go | 3 |
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) |
