Skip to content

Commit

Permalink
Fix for log4j patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaz492 committed Nov 23, 2024
1 parent 48aa405 commit c07d4a8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modloaders/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

func Log4JFixer(installDir string, mcVersion string) (string, error) {
patchesPath := filepath.Join(installDir, ".patches")
patchesPath := filepath.Join(".patches")
mcSemVer, err := semVer.NewVersion(mcVersion)
if err != nil {
return "", err
Expand All @@ -24,7 +24,7 @@ func Log4JFixer(installDir string, mcVersion string) (string, error) {
return "", err
}
if !exists {
err := os.MkdirAll(patchesPath, os.ModePerm)
err := os.MkdirAll(filepath.Join(installDir, patchesPath), os.ModePerm)
if err != nil {
return "", err
}
Expand All @@ -38,7 +38,7 @@ func Log4JFixer(installDir string, mcVersion string) (string, error) {
}
defer get.Body.Close()

out, err := os.Create(filepath.Join(patchesPath, "log4j2_17-111.xml"))
out, err := os.Create(filepath.Join(installDir, patchesPath, "log4j2_17-111.xml"))
if err != nil {
return "", err
}
Expand All @@ -60,7 +60,7 @@ func Log4JFixer(installDir string, mcVersion string) (string, error) {
}
defer get.Body.Close()

out, err := os.Create(filepath.Join(patchesPath, "log4j2_112-116.xml"))
out, err := os.Create(filepath.Join(installDir, patchesPath, "log4j2_112-116.xml"))
if err != nil {
return "", err
}
Expand Down

0 comments on commit c07d4a8

Please sign in to comment.