From e306cc45d5ac6b279a4e238443d7ad41bdde271b Mon Sep 17 00:00:00 2001 From: oy Date: Sat, 13 Nov 2010 23:54:34 +0100 Subject: show real $USERDIR and $DATADIR path on startup --- src/engine/shared/storage.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/engine/shared') diff --git a/src/engine/shared/storage.cpp b/src/engine/shared/storage.cpp index 46127700..19d82dfd 100644 --- a/src/engine/shared/storage.cpp +++ b/src/engine/shared/storage.cpp @@ -124,30 +124,35 @@ public: if(m_NumPaths >= MAX_PATHS || !pPath[0]) return; - int OldNum = m_NumPaths; - if(!str_comp(pPath, "$USERDIR")) { if(m_aUserdir[0]) + { str_copy(m_aaStoragePaths[m_NumPaths++], m_aUserdir, MAX_PATH_LENGTH); + dbg_msg("storage", "added path '$USERDIR' ('%s')", m_aUserdir); + } } else if(!str_comp(pPath, "$DATADIR")) { if(m_aDatadir[0]) + { str_copy(m_aaStoragePaths[m_NumPaths++], m_aDatadir, MAX_PATH_LENGTH); + dbg_msg("storage", "added path '$DATADIR' ('%s')", m_aDatadir); + } } else if(!str_comp(pPath, "$CURRENTDIR")) { m_aaStoragePaths[m_NumPaths++][0] = 0; + dbg_msg("storage", "added path '$CURRENTDIR'"); } else { if(fs_is_dir(pPath)) + { str_copy(m_aaStoragePaths[m_NumPaths++], pPath, MAX_PATH_LENGTH); + dbg_msg("storage", "added path '%s'", pPath); + } } - - if(OldNum != m_NumPaths) - dbg_msg("storage", "added path '%s'", pPath); } void FindDatadir(const char *pArgv0) -- cgit 1.4.1