diff options
Diffstat (limited to 'src/config.hpp')
-rw-r--r-- | src/config.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/config.hpp b/src/config.hpp index f812c5a..be3fbf3 100644 --- a/src/config.hpp +++ b/src/config.hpp @@ -86,6 +86,17 @@ static std::string get_config_dir() { return config_dir; } +static std::string get_videos_dir() { + std::string videos_dir; + const char *xdg_videos_dir = getenv("XDG_VIDEOS_DIR"); + if(xdg_videos_dir) { + videos_dir = xdg_videos_dir; + } else { + videos_dir = get_home_dir() + "/Videos"; + } + return videos_dir; +} + static int create_directory_recursive(char *path) { int path_len = strlen(path); char *p = path; |