From 0ed976a06e9fa6821952648767dc8738a4ccfdd0 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Thu, 6 Feb 2025 20:50:01 +0200 Subject: [PATCH] Fixed bug where the getDistroAsciiArt function would ignore the systemConfigDir variable --- utils.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utils.go b/utils.go index 4e0ca15..94196a3 100644 --- a/utils.go +++ b/utils.go @@ -73,8 +73,8 @@ func getDistroAsciiArt() string { } userConfDir, err := os.UserConfigDir() if err != nil { - if _, err := os.Stat(path.Join("/etc/stormfetch/ascii/", id)); err == nil { - bytes, err := os.ReadFile(path.Join("/etc/stormfetch/ascii/", id)) + if _, err := os.Stat(path.Join(systemConfigDir, "stormfetch/ascii/", id)); err == nil { + bytes, err := os.ReadFile(path.Join(systemConfigDir, "stormfetch/ascii/", id)) if err != nil { return defaultAscii } @@ -89,8 +89,8 @@ func getDistroAsciiArt() string { return defaultAscii } return string(bytes) - } else if _, err := os.Stat(path.Join("/etc/stormfetch/ascii/", id)); err == nil { - bytes, err := os.ReadFile(path.Join("/etc/stormfetch/ascii/", id)) + } else if _, err := os.Stat(path.Join(systemConfigDir, "stormfetch/ascii/", id)); err == nil { + bytes, err := os.ReadFile(path.Join(systemConfigDir, "stormfetch/ascii/", id)) if err != nil { return defaultAscii }