Update of /cvsroot/opensdk/openSDK/loader
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3334
Modified Files:
main.cc
Log Message:
use resolve_case_insensitive_path() on file paths
Index: main.cc
===================================================================
RCS file: /cvsroot/opensdk/openSDK/loader/main.cc,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- main.cc 25 Apr 2007 18:46:45 -0000 1.54
+++ main.cc 15 Jul 2007 15:18:25 -0000 1.55
@@ -106,10 +106,14 @@
#endif
; // from dlopen_flags
- string tmp_mod_name = name;
+ char *path = resolve_case_insensitive_path(name);
+
+ string tmp_mod_name = path;
tmp_mod_name += ".tmp";
- int ret = gunzip_module(name, tmp_mod_name.c_str());
+ int ret = gunzip_module(path, tmp_mod_name.c_str());
+ free(path);
+
if (ret != Z_OK) {
cerr << "Couldn't gunzip the module properly. Error " << ret << ": " << zError(ret) << endl;
return false;
@@ -160,7 +164,10 @@
/** parse the OBJECT.CFG file and load the necessary modules */
static bool parse_object_cfg(void)
{
- fstream objectsFile("MS/OPEN-R/MW/CONF/OBJECT.CFG");
+ char *path = resolve_case_insensitive_path("MS/OPEN-R/MW/CONF/OBJECT.CFG");
+ fstream objectsFile(path);
+ free(path);
+
if (!objectsFile) {
cerr << "Couldn't open the OBJECT.CFG file" << endl;
return false;
@@ -182,7 +189,10 @@
/** parse the CONNECT.CFG file fill in the DB with the information extracted */
static bool parse_connect_cfg(void)
{
- fstream file("MS/OPEN-R/MW/CONF/CONNECT.CFG");
+ char *path = resolve_case_insensitive_path("MS/OPEN-R/MW/CONF/CONNECT.CFG");
+ fstream file(path);
+ free(path);
+
if (!file) {
// the file is optional
return true;
|