Update source files for bracket style

This commit is contained in:
Marshall Greenblatt
2023-01-02 17:59:03 -05:00
parent d84b07a5cb
commit 3af3eab3e4
366 changed files with 7275 additions and 3834 deletions

View File

@ -16,15 +16,17 @@ bool GetResourceDir(std::string& dir) {
// Retrieve the executable path.
ssize_t len = readlink("/proc/self/exe", buff, sizeof(buff) - 1);
if (len == -1)
if (len == -1) {
return false;
}
buff[len] = 0;
// Remove the executable name from the path.
char* pos = strrchr(buff, '/');
if (!pos)
if (!pos) {
return false;
}
// Add "files" to the path.
strcpy(pos + 1, "files");