Fix RUN_IN_PLACE broken due to invalid usage of assert
authorsapier <Sapier at GMX dot net>
Sat, 7 Mar 2015 14:22:35 +0000 (15:22 +0100)
committersapier <Sapier at GMX dot net>
Sat, 7 Mar 2015 14:22:35 +0000 (15:22 +0100)
src/porting.cpp

index 6d0ab78c4ab2e547f961521950ac32b73fa567fb..64a51c7f50527505a4ec883eccf802da09d91909 100644 (file)
@@ -375,7 +375,7 @@ void initializePaths()
        char buf[BUFSIZ];
        memset(buf, 0, BUFSIZ);
        // Get path to executable
-       assert(readlink("/proc/self/exe", buf, BUFSIZ-1) != -1);
+       FATAL_ERROR_IF(readlink("/proc/self/exe", buf, BUFSIZ-1) == -1, "Failed to get cwd");
 
        pathRemoveFile(buf, '/');