aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2022-04-04 19:38:22 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2022-04-04 19:38:22 +0200
commiteb09b6aaa290c5cfd06aa7939683a30ce29979fb (patch)
tree774c0c4f56a01b218dd89c121f1feb32e43bed27
parentIn progress (diff)
downloadgo2work-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.go9
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
}