Skip to content

Commit 1740de5

Browse files
committed
xrCore: fix delimiter in ini file loader
1 parent 17015f1 commit 1740de5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/xrCore/xr_ini.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,10 @@ CInifile::CInifile(pcstr fileName, bool readOnly, bool loadAtStart, bool saveAtE
345345
if (fileName)
346346
xr_strcpy(m_file_name, sizeof m_file_name, fileName);
347347

348+
#ifdef LINUX
349+
while (char* sep = strchr(m_file_name, '\\')) *sep = '/';
350+
#endif
351+
348352
m_flags.set(eSaveAtEnd, saveAtEnd);
349353
m_flags.set(eReadOnly, readOnly);
350354

@@ -638,6 +642,9 @@ bool CInifile::save_as(pcstr new_fname)
638642
xr_strcpy(m_file_name, sizeof m_file_name, new_fname);
639643

640644
R_ASSERT(m_file_name && m_file_name[0]);
645+
#ifdef LINUX
646+
while (char* sep = strchr(m_file_name, '\\')) *sep = '/';
647+
#endif
641648
IWriter* F = FS.w_open_ex(m_file_name);
642649
if (!F)
643650
return false;

0 commit comments

Comments
 (0)