Fixed bug where the getDistroAsciiArt function would ignore the systemConfigDir variable
This commit is contained in:
parent
ce9813a2af
commit
0ed976a06e
8
utils.go
8
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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user