Changeset 182


Ignore:
Timestamp:
Dec 17, 2017, 5:51:59 PM (7 years ago)
Author:
Gregg Young
Message:

Fix to restore ability to use relative paths in the configuration.. Ticket #82

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/cfte.cpp

    r175 r182  
    21292129#else // if PT_UNIXISH
    21302130#if defined(OS2)
    2131 #       define SEARCH_PATH_LEN 25
     2131#       define SEARCH_PATH_LEN 26
    21322132#else
    21332133#       define SEARCH_PATH_LEN 21
     
    21372137        const char *pg = getenv("EFTEDIR");
    21382138#if defined(OS2)
    2139         snprintf(dirs[0], MAXPATH, "%s/config/%s", pg, CfgName);
    2140         snprintf(dirs[1], MAXPATH, "%s/%s", pg, CfgName); //EFTEDIR can be full path to config files
    2141         snprintf(dirs[2], MAXPATH, "%s/local/%s", pg, CfgName);
     2139       
     2140        snprintf(dirs[0], MAXPATH, "%s%s", last, CfgName);
     2141        snprintf(dirs[1], MAXPATH, "%s/config/%s", pg, CfgName);
     2142        snprintf(dirs[2], MAXPATH, "%s/%s", pg, CfgName); //EFTEDIR can be full path to config files
    21422143        snprintf(dirs[3], MAXPATH, "%s/../%s", pg, CfgName);
    21432144        ExePath = (char *) malloc(MAXPATH);
     
    21752176        snprintf(dirs[23], MAXPATH, "/Program Files (x86)/efte/config/%s", CfgName);
    21762177        snprintf(dirs[24], MAXPATH, "/Program Files (x86)/efte/%s", CfgName);
     2178        snprintf(dirs[25], MAXPATH, "%s/local/%s", pg, CfgName);
     2179
    21772180#else // if OS2
    21782181        snprintf(dirs[0], MAXPATH, "%s/config/%s", pg, CfgName);
     
    22252228        if (!stricmp(lastCfg, Cfg))
    22262229            DieError(1, "File '%s' is (o)including itself", Cfg);
    2227         strlcpy(lastCfg, Cfg, sizeof(lastCfg));
     2230        if (found) {
     2231            strlcpy(lastCfg, Cfg, sizeof(lastCfg));
     2232        }
    22282233        if (found == false && stricmp(Cfg, "edefault.fte") && !checked && !optional) {
    22292234            ChoiceInfo *choice;
Note: See TracChangeset for help on using the changeset viewer.