]> git.cworth.org Git - apitrace/blobdiff - common/os_posix.cpp
gltrace: Prevent crash in _glGetDebugMessageLog_length (issue #140).
[apitrace] / common / os_posix.cpp
index 5ec8b363390792748e733a6d8d5e7a9b3afadb24..7ddd89530f4883fda0efc85fdac69e4e4df67c4d 100644 (file)
@@ -111,6 +111,12 @@ getCurrentDir(void)
     return path;
 }
 
+bool
+createDirectory(const String &path)
+{
+    return mkdir(path, 0777) == 0;
+}
+
 bool
 String::exists(void) const
 {
@@ -122,9 +128,6 @@ String::exists(void) const
         return false;
     }
 
-    if (!S_ISREG(st.st_mode))
-        return false;
-
     return true;
 }