diff --git a/src/xrCore/LocatorAPI.cpp b/src/xrCore/LocatorAPI.cpp index dd43721dcf1..2589a856017 100644 --- a/src/xrCore/LocatorAPI.cpp +++ b/src/xrCore/LocatorAPI.cpp @@ -860,8 +860,7 @@ void CLocatorAPI::_initialize(u32 flags, pcstr target_folder, pcstr fs_name) _GetItem(temp, 5, capt, _delimiter); xr_strlwr(id); - xr_strlwr(root); - lp_add = cnt >= 4 ? xr_strlwr(add) : 0; + lp_add = cnt >= 4 ? add : 0; lp_def = cnt >= 5 ? def : 0; lp_capt = cnt >= 6 ? capt : 0; @@ -1465,7 +1464,6 @@ IWriter* CLocatorAPI::w_open(pcstr path, pcstr _fname) { string_path fname; xr_strcpy(fname, _fname); - xr_strlwr(fname); //,".$"); if (path && path[0]) update_path(fname, path, fname); CFileWriter* W = new CFileWriter(fname, false); @@ -1480,7 +1478,6 @@ IWriter* CLocatorAPI::w_open_ex(pcstr path, pcstr _fname) { string_path fname; xr_strcpy(fname, _fname); - xr_strlwr(fname); //,".$"); if (path && path[0]) update_path(fname, path, fname); CFileWriter* W = new CFileWriter(fname, true); @@ -1642,7 +1639,7 @@ void CLocatorAPI::file_rename(pcstr src, pcstr dest, bool overwrite) xr_free(str); m_files.erase(S); // insert updated item - new_desc.name = xr_strlwr(xr_strdup(dest)); + new_desc.name = xr_strdup(dest); m_files.insert(new_desc); // physically rename file diff --git a/src/xrCore/LocatorAPI_defs.cpp b/src/xrCore/LocatorAPI_defs.cpp index 174fae21e5b..dc51e19c898 100644 --- a/src/xrCore/LocatorAPI_defs.cpp +++ b/src/xrCore/LocatorAPI_defs.cpp @@ -32,7 +32,6 @@ FS_File::FS_File(const xr_string& nm, const _FINDDATA_T& f) {} void FS_File::set(const xr_string& nm, long sz, time_t modif, unsigned attr) { name = nm; - xr_strlwr(name); size = sz; time_write = modif; attrib = attr; @@ -58,9 +57,9 @@ FS_Path::FS_Path(LPCSTR _Root, LPCSTR _Add, LPCSTR _DefExt, LPCSTR _FilterCaptio if (temp[0] && temp[xr_strlen(temp) - 1] != _DELIMITER) xr_strcat(temp, DELIMITER); m_Path = xr_strdup(temp); - m_DefExt = _DefExt ? xr_strlwr(xr_strdup(_DefExt)) : 0; + m_DefExt = _DefExt ? xr_strdup(_DefExt) : 0; m_FilterCaption = _FilterCaption ? xr_strlwr(xr_strdup(_FilterCaption)) : 0; - m_Add = _Add ? xr_strlwr(xr_strdup(_Add)) : 0; + m_Add = _Add ? xr_strdup(_Add) : 0; m_Root = _Root ? xr_strdup(_Root) : 0; m_Flags.assign(flags); #ifdef _EDITOR @@ -83,7 +82,7 @@ void FS_Path::_set(LPCSTR add) // m_Add R_ASSERT(add); xr_free(m_Add); - m_Add = xr_strlwr(xr_strdup(add)); + m_Add = xr_strdup(add); // m_Path string_path temp; diff --git a/src/xrCore/xr_ini.cpp b/src/xrCore/xr_ini.cpp index 30c91424e0f..c69c95c7574 100644 --- a/src/xrCore/xr_ini.cpp +++ b/src/xrCore/xr_ini.cpp @@ -457,6 +457,8 @@ void CInifile::Load(IReader* F, pcstr path, allow_include_func_t allow_include_f tmp_ptr = strchr(tmp_ptr, '\\'); } #endif + xr_strlwr(inc_name); // compensate removed xr_strlwr on path + string_path fn; strconcat(sizeof fn, fn, path, inc_name); const xr_string inc_path = EFS_Utils::ExtractFilePath(fn); @@ -690,7 +692,9 @@ CInifile::Sect& CInifile::r_section(pcstr S) const xr_strcpy(section, sizeof section, S); xr_strlwr(section); auto I = std::lower_bound(DATA.cbegin(), DATA.cend(), section, sect_pred); - if (!(I != DATA.cend() && xr_strcmp(*(*I)->Name, section) == 0)) + if (I == DATA.cend()) + xrDebug::Fatal(DEBUG_INFO, "Can't find section '%s'.", S); + else if (xr_strcmp(*(*I)->Name, section)) { // g_pStringContainer->verify(); @@ -703,8 +707,7 @@ CInifile::Sect& CInifile::r_section(pcstr S) const // F->w_string ("shared strings:"); // g_pStringContainer->dump(F); // FS.w_close (F); - - xrDebug::Fatal(DEBUG_INFO, "Can't open section '%s'. Please attach [*.ini_log] file to your bug report", S); + xrDebug::Fatal(DEBUG_INFO, "Can't open section '%s' (only '%s' avail). Please attach [*.ini_log] file to your bug report", section, *(*I)->Name); } return **I; }