Changed sequence of config search, thanks to Alexey Vissarionov 2:5020/545
This commit is contained in:
@@ -100,19 +100,19 @@
|
||||
|
||||
#ifndef CFGUSERPATH1
|
||||
#ifdef __UNIX__
|
||||
#define CFGUSERPATH1 "~/.golded/" /* Trailing slash: this is directory */
|
||||
#define CFGUSERPATH1 "~/fido/etc/" /* Trailing slash: this is directory */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef CFGUSERPATH2
|
||||
#ifdef __UNIX__
|
||||
#define CFGUSERPATH2 "~/"
|
||||
#define CFGUSERPATH2 "~/ftn/etc/" /* Trailing slash: this is directory */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef CFGPATH
|
||||
#ifdef __UNIX__
|
||||
#define CFGPATH "/usr/local/etc/"
|
||||
#define CFGPATH "~/.golded/" /* Trailing slash: this is directory */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@@ -683,15 +683,17 @@ void Initialize(int argc, char* argv[]) {
|
||||
found = FindCfg(cmdlinecfg);
|
||||
}
|
||||
|
||||
#ifndef __UNIX__
|
||||
// Get it where the the binary file is
|
||||
if(not found) {
|
||||
extractdirname(cmdlinecfg, argv[0]);
|
||||
found = FindCfg(cmdlinecfg);
|
||||
|
||||
// If we still could not find config name...
|
||||
if(not found)
|
||||
strcat(cmdlinecfg, GEDCFG);
|
||||
}
|
||||
#endif
|
||||
|
||||
// If we still could not find config name...
|
||||
if(not found)
|
||||
strcat(cmdlinecfg, GEDCFG);
|
||||
}
|
||||
extractdirname(CFG->goldpath, cmdlinecfg);
|
||||
truepathtmp = CFG->goldpath;
|
||||
|
Reference in New Issue
Block a user