From ef25979df46ab4e607c1f2a52c93c1dcb69794af Mon Sep 17 00:00:00 2001 From: Kye Bostelmann Date: Tue, 27 Sep 2016 13:27:17 -0300 Subject: [PATCH] Fix error check conditional Ignore file already exist errors. The "modpacks" directory will exist at least on the second launch. --- src/mods.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mods.go b/src/mods.go index fe4c96c..1c7a521 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 { + if err != nil && os.IsNotExist(err) { log.Printf("Could not create modpacks directory: %s", err) return err }