From fb8939e2828ff2ab4e9503d346d250ff2bd143bf Mon Sep 17 00:00:00 2001 From: welt Date: Wed, 28 Sep 2022 21:03:37 -0400 Subject: [PATCH] Switch back to filepath.Base, fixes gameinfo protection. --- upgrade.go | 2 +- verify.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/upgrade.go b/upgrade.go index eac4ac7..95e1d1f 100644 --- a/upgrade.go +++ b/upgrade.go @@ -146,7 +146,7 @@ func upgradeMain(dir string, url string, threads int, http1 bool, owGameInfo boo return true } - isOF := (filepath.Dir(dir) == "open_fortress") + isOF := (filepath.Base(dir) == "open_fortress") for _, v := range writes { change := v diff --git a/verify.go b/verify.go index 9561a3a..65aa38b 100644 --- a/verify.go +++ b/verify.go @@ -154,7 +154,7 @@ func verifyMain(dir string, url string, repair bool, http1 bool, owGameInfo bool return 1 } - isOF := (filepath.Dir(absPath) == "open_fortress") + isOF := (filepath.Base(absPath) == "open_fortress") for _, change := range writes { path, err := resolvePath(dir, change.Path) -- 2.45.2