[Orxonox-commit 2920] r7623 - code/branches/ois_update/src/libraries/core

rgrieder at orxonox.net rgrieder at orxonox.net
Sat Nov 6 17:09:16 CET 2010


Author: rgrieder
Date: 2010-11-06 17:09:15 +0100 (Sat, 06 Nov 2010)
New Revision: 7623

Modified:
   code/branches/ois_update/src/libraries/core/PathConfig.cc
Log:
Cosmetic changes.

Modified: code/branches/ois_update/src/libraries/core/PathConfig.cc
===================================================================
--- code/branches/ois_update/src/libraries/core/PathConfig.cc	2010-11-06 15:50:15 UTC (rev 7622)
+++ code/branches/ois_update/src/libraries/core/PathConfig.cc	2010-11-06 16:09:15 UTC (rev 7623)
@@ -89,10 +89,9 @@
 #ifdef ORXONOX_PLATFORM_WINDOWS
         // get executable module
         TCHAR buffer[1024];
-        if (GetModuleFileName(NULL, buffer, 1024) == 0){
+        if (GetModuleFileName(NULL, buffer, 1024) == 0)
             ThrowException(General, "Could not retrieve executable path.");
-		}
-		
+
 #elif defined(ORXONOX_PLATFORM_APPLE)
         char buffer[1024];
         uint32_t path_len = 1023;
@@ -125,15 +124,13 @@
         buffer[ret] = 0;
 #endif
 
-        executablePath_ = bf::path(buffer);
-//#ifndef ORXONOX_PLATFORM_APPLE
-        executablePath_ = executablePath_.branch_path(); // remove executable name
-//#endif
-		
+        // Remove executable filename
+        executablePath_ = bf::path(buffer).branch_path();
+
         /////////////////////
         // SET MODULE PATH //
         /////////////////////
-		
+
         if (bf::exists(executablePath_ / "orxonox_dev_build.keep_me"))
         {
             COUT(1) << "Running from the build tree." << std::endl;




More information about the Orxonox-commit mailing list