From afb133a00a19f8a1340f5c6b221c66ad6e3e387b Mon Sep 17 00:00:00 2001 From: Kye Bostelmann Date: Tue, 27 Sep 2016 14:49:36 -0300 Subject: [PATCH] Fix error check conditional Oops, the condition should test for a "file already exists" error. --- src/mods.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mods.go b/src/mods.go index 1c7a521..d598f23 100644 --- a/src/mods.go +++ b/src/mods.go @@ -110,7 +110,7 @@ func rmModPack(modpack string) error { func createModPackDir() error { err := os.Mkdir(filepath.Join(config.FactorioDir, "modpacks"), 0775) - if err != nil && os.IsNotExist(err) { + if err != nil && !os.IsExist(err) { log.Printf("Could not create modpacks directory: %s", err) return err }