Fix error check conditional

Ignore file already exist errors. The "modpacks" directory will exist at least on the second launch.
This commit is contained in:
Kye Bostelmann 2016-09-27 13:27:17 -03:00 committed by GitHub
parent 789a0e25a7
commit ef25979df4

View File

@ -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
}