~welt/murse

dafdd50fd20a8172d7a59f9fba9fa381018a3543 — welt 19 days ago a46d341
Use user cache directory for manifest, gitignore
2 files changed, 9 insertions(+), 2 deletions(-)

M .gitignore
M main.go
M .gitignore => .gitignore +1 -0
@@ 1,4 1,5 @@
test/
murse.exe
murse
./murse
open_fortress/

M main.go => main.go +8 -2
@@ 45,9 45,15 @@ func main() {
		}
	}

	tf := os.TempDir() + "/tmp-ofmanifest.db"
	cd, err := os.UserCacheDir()
	if err != nil {
		log.Fatal("Failed to determine cache directory: " + err.Error())
	}

	mcd := cd + "/murse/"
	tf := mcd + "/manifest.db"

	err = os.WriteFile(tf, *m, 0777)
	err = os.WriteFile(tf+"/manifest.db", *m, 0777)
	if err != nil {
		log.Fatal(err)
	}