aboutsummaryrefslogtreecommitdiff
path: root/src/Utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Utils.cpp')
-rw-r--r--src/Utils.cpp17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/Utils.cpp b/src/Utils.cpp
index 0f86ecc..6d45196 100644
--- a/src/Utils.cpp
+++ b/src/Utils.cpp
@@ -198,21 +198,4 @@ namespace gsr {
}
return result;
}
-
- std::optional<std::string> get_gsr_runtime_dir() {
- std::optional<std::string> result;
- char runtime_dir_path[256];
- snprintf(runtime_dir_path, sizeof(runtime_dir_path), "/run/user/%u", (unsigned int)getuid());
-
- struct stat st;
- if(stat(runtime_dir_path, &st) == -1 || !S_ISDIR(st.st_mode))
- snprintf(runtime_dir_path, sizeof(runtime_dir_path), "/tmp");
-
- strcat(runtime_dir_path, "/gsr-ui");
- if(create_directory_recursive(runtime_dir_path) != 0)
- return result;
-
- result = runtime_dir_path;
- return result;
- }
} \ No newline at end of file