From 69bbc5e77993e5323e811c7958d5cc23b095cf3e Mon Sep 17 00:00:00 2001 From: baldurk Date: Sat, 3 Jan 2015 18:49:02 +0000 Subject: [PATCH] Implement GetAppFolderFilename on linux, unused at the moment --- renderdoc/os/linux/linux_stringio.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/renderdoc/os/linux/linux_stringio.cpp b/renderdoc/os/linux/linux_stringio.cpp index 578b3e98c..5ec7c1998 100644 --- a/renderdoc/os/linux/linux_stringio.cpp +++ b/renderdoc/os/linux/linux_stringio.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -119,6 +120,18 @@ namespace Keyboard namespace FileIO { + string GetAppFolderFilename(string filename) + { + passwd *pw = getpwuid(getuid()); + const char *homedir = pw->pw_dir; + + string ret = string(homedir) + "/.renderdoc/"; + + mkdir(ret.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); + + return ret + filename; + } + void GetExecutableFilename(string &selfName) { char path[512] = {0};