From 482b4c0dca6a734e0e1d42777d9d1bd7851fbfcf Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 2 Oct 2003 11:14:32 +0000 Subject: [PATCH] Patch level : 2.0 588 Files correlati : ve0.exe ve1.exe ve6.exe Ricompilazione Demo : [ ] Commento : GF20103 Sui documenti interattivi di vendita non legge il .ini nel direttorio CUSTOM git-svn-id: svn://10.65.10.50/trunk@11459 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- include/config.cpp | 7 +++++-- include/mask.cpp | 3 ++- include/strings.cpp | 32 ++++++++++++++++++-------------- 3 files changed, 25 insertions(+), 17 deletions(-) diff --git a/include/config.cpp b/include/config.cpp index a689ccfd8..66a5f643b 100755 --- a/include/config.cpp +++ b/include/config.cpp @@ -777,8 +777,11 @@ TConfig::TConfig(int which_config, const char* paragraph) } TConfig::TConfig(const char *fn, const char* pa) -{ init(fn, pa, FALSE); } - +{ + TFilename f(fn); + f.custom_path(); + init(f, pa, FALSE); +} TConfig::~TConfig() { diff --git a/include/mask.cpp b/include/mask.cpp index 87feca93b..c01b46770 100755 --- a/include/mask.cpp +++ b/include/mask.cpp @@ -788,7 +788,8 @@ bool TMask::on_key( case K_F1: { char key[_MAX_FNAME]; - _splitpath(source_file(), NULL, NULL, key, NULL); + xvt_fsys_parse_pathname(source_file(), NULL, NULL, key, NULL, NULL); + EVENT e; memset(&e, 0, sizeof(e)); e.type = E_HELP; e.v.help.tag = M_HELP_ONCONTEXT; diff --git a/include/strings.cpp b/include/strings.cpp index fdfa96bec..5239e2924 100755 --- a/include/strings.cpp +++ b/include/strings.cpp @@ -1291,20 +1291,24 @@ bool TFilename::input() bool TFilename::custom_path(const char* path_list) { - TToken_string pl = path_list; - if (pl.empty()) - pl = "custom"; - TFilename cust; - FOR_EACH_TOKEN(pl, path) - { - cust = path; - cust.add(name()); - if (cust.exist()) - { - set(cust); - return true; - } - } + const char* fname = name(); + + if (*this == fname) // Non c'e' path + { + TToken_string pl = path_list; + if (pl.empty()) + pl = "custom"; + FOR_EACH_TOKEN(pl, path) + { + TFilename cust = path; + cust.add(fname); + if (cust.exist()) + { + set(cust); + return true; + } + } + } return false; }