about summary refs log tree commit diff
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2010-11-13 23:54:34 +0100
committeroy <Tom_Adams@web.de>2010-11-13 23:54:34 +0100
commite306cc45d5ac6b279a4e238443d7ad41bdde271b (patch)
treea3d2ba8cb4571ed7cf938a6bd70fab5bd22edd61
parent4dce645ba8bd3527904603b8383796eaa341815a (diff)
downloadzcatch-e306cc45d5ac6b279a4e238443d7ad41bdde271b.tar.gz
zcatch-e306cc45d5ac6b279a4e238443d7ad41bdde271b.zip
show real $USERDIR and $DATADIR path on startup
-rw-r--r--src/engine/shared/storage.cpp15
1 files changed, 10 insertions, 5 deletions
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)