From 49bea07df704cca9366203082d458b3d90438fbc Mon Sep 17 00:00:00 2001 From: oy Date: Sat, 11 Dec 2010 23:10:13 +0100 Subject: show the path of $CURRENTDIR. Closes #323 --- src/engine/shared/storage.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/engine/shared') diff --git a/src/engine/shared/storage.cpp b/src/engine/shared/storage.cpp index 0274ea19..d19be8a8 100644 --- a/src/engine/shared/storage.cpp +++ b/src/engine/shared/storage.cpp @@ -21,6 +21,7 @@ public: int m_NumPaths; char m_aDatadir[MAX_PATH_LENGTH]; char m_aUserdir[MAX_PATH_LENGTH]; + char m_aCurrentdir[MAX_PATH_LENGTH]; CStorage() { @@ -38,6 +39,10 @@ public: // get datadir FindDatadir(ppArguments[0]); + // get currentdir + if(!fs_getcwd(m_aCurrentdir, sizeof(m_aCurrentdir))) + m_aCurrentdir[0] = 0; + // load paths from storage.cfg LoadPaths(ppArguments[0]); @@ -134,7 +139,7 @@ public: else if(!str_comp(pPath, "$CURRENTDIR")) { m_aaStoragePaths[m_NumPaths++][0] = 0; - dbg_msg("storage", "added path '$CURRENTDIR'"); + dbg_msg("storage", "added path '$CURRENTDIR' ('%s')", m_aCurrentdir); } else { -- cgit 1.4.1