Separate config and data files for Windows (#2051)
This commit is contained in:
1 parent
93400c11a0
commit
82a983d934
4 files changed
+25
-26
No files matched your search
+6
-4
@@ -74,23 +74,25 @@ func init() {
|
||||
Username: username,
|
||||
}
|
||||
|
||||
data := cmp.Or(os.Getenv("LF_CONFIG_HOME"), os.Getenv("LOCALAPPDATA"))
|
||||
config := cmp.Or(os.Getenv("LF_CONFIG_HOME"), os.Getenv("APPDATA"))
|
||||
|
||||
gConfigPaths = []string{
|
||||
filepath.Join(os.Getenv("ProgramData"), "lf", "lfrc"),
|
||||
filepath.Join(data, "lf", "lfrc"),
|
||||
filepath.Join(config, "lf", "lfrc"),
|
||||
}
|
||||
|
||||
gColorsPaths = []string{
|
||||
filepath.Join(os.Getenv("ProgramData"), "lf", "colors"),
|
||||
filepath.Join(data, "lf", "colors"),
|
||||
filepath.Join(config, "lf", "colors"),
|
||||
}
|
||||
|
||||
gIconsPaths = []string{
|
||||
filepath.Join(os.Getenv("ProgramData"), "lf", "icons"),
|
||||
filepath.Join(data, "lf", "icons"),
|
||||
filepath.Join(config, "lf", "icons"),
|
||||
}
|
||||
|
||||
data := cmp.Or(os.Getenv("LF_DATA_HOME"), os.Getenv("LOCALAPPDATA"))
|
||||
|
||||
gFilesPath = filepath.Join(data, "lf", "files")
|
||||
gMarksPath = filepath.Join(data, "lf", "marks")
|
||||
gTagsPath = filepath.Join(data, "lf", "tags")
|
||||
|
||||
Reference in new issue
Block a user