Compare commits

..

No commits in common. 'master' and 'v0.2.1' have entirely different histories.

@ -7,6 +7,7 @@ import (
"fmt"
"math"
"os"
"os/user"
"path/filepath"
)
@ -77,11 +78,11 @@ func main() {
flag.Parse()
// Check if config exists. If it doesn't, generate the config files.
userHomeDir, err := os.UserHomeDir() // Get current user's home directory, to construct config path
currentUser, err := user.Current() // Get current user, to determine config path
if err != nil {
panic(err)
}
configPath := filepath.Join(userHomeDir + "/.config/ccat/")
configPath := filepath.Join("/home/" + currentUser.Username + "/.config/ccat/")
if _, err := os.Stat(configPath); os.IsNotExist(err) {
generateDefaultConfigs(configPath)
}

Loading…
Cancel
Save