diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2022-04-04 19:38:22 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2022-04-04 19:38:22 +0200 |
commit | eb09b6aaa290c5cfd06aa7939683a30ce29979fb (patch) | |
tree | 774c0c4f56a01b218dd89c121f1feb32e43bed27 | |
parent | In progress (diff) | |
download | go2work-eb09b6aaa290c5cfd06aa7939683a30ce29979fb.tar.gz go2work-eb09b6aaa290c5cfd06aa7939683a30ce29979fb.tar.bz2 go2work-eb09b6aaa290c5cfd06aa7939683a30ce29979fb.tar.xz go2work-eb09b6aaa290c5cfd06aa7939683a30ce29979fb.tar.zst go2work-eb09b6aaa290c5cfd06aa7939683a30ce29979fb.zip |
In progress
-rw-r--r-- | src/p_options.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/p_options.go b/src/p_options.go index f62d3e4..6f43ae4 100644 --- a/src/p_options.go +++ b/src/p_options.go @@ -85,9 +85,14 @@ func find_options_file() string { } dir, err := os.UserHomeDir() if err != nil { - log.Fatal(err) + log.Println(err) + } else { + file_path = dir + "/.config/" + OPTIONS_FILE + if check_file_exists(file_path) == true { + return file_path + } } - file_path = dir + "/.config/" + OPTIONS_FILE + file_path = "/usr/local/share/" + OPTIONS_FILE if check_file_exists(file_path) == true { return file_path } |