Skip to content

Commit

Permalink
Sane default path for thumbnails [on linux].
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiobenrocha2 committed Apr 23, 2016
1 parent bbb7871 commit 7db1d20
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,9 @@ static void config_set_defaults(void)
if (*g_defaults.dir.wallpapers)
strlcpy(settings->dynamic_wallpapers_directory,
g_defaults.dir.wallpapers, sizeof(settings->dynamic_wallpapers_directory));
if (*g_defaults.dir.thumbnails)
strlcpy(settings->thumbnails_directory,
g_defaults.dir.thumbnails, sizeof(settings->thumbnails_directory));
if (*g_defaults.dir.remap)
strlcpy(settings->input_remapping_directory,
g_defaults.dir.remap, sizeof(settings->input_remapping_directory));
Expand Down
2 changes: 2 additions & 0 deletions content.c
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,8 @@ static void check_defaults_dirs(void)
check_defaults_dir_create_dir(g_defaults.dir.cursor);
if (*g_defaults.dir.cheats)
check_defaults_dir_create_dir(g_defaults.dir.cheats);
if (*g_defaults.dir.thumbnails)
check_defaults_dir_create_dir(g_defaults.dir.thumbnails);
}

void content_push_to_history_playlist(bool do_push,
Expand Down
1 change: 1 addition & 0 deletions defaults.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ struct defaults
char remap[PATH_MAX_LENGTH];
char cache[PATH_MAX_LENGTH];
char wallpapers[PATH_MAX_LENGTH];
char thumbnails[PATH_MAX_LENGTH];
char database[PATH_MAX_LENGTH];
char cursor[PATH_MAX_LENGTH];
char cheats[PATH_MAX_LENGTH];
Expand Down
4 changes: 4 additions & 0 deletions frontend/drivers/platform_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -1837,6 +1837,8 @@ static void frontend_linux_get_env(int *argc,
app_dir, "remaps", sizeof(g_defaults.dir.remap));
fill_pathname_join(g_defaults.dir.wallpapers,
app_dir, "wallpapers", sizeof(g_defaults.dir.wallpapers));
fill_pathname_join(g_defaults.dir.thumbnails,
app_dir, "thumbnails", sizeof(g_defaults.dir.thumbnails));
if(*downloads_dir && test_permissions(downloads_dir))
{
fill_pathname_join(g_defaults.dir.core_assets,
Expand Down Expand Up @@ -2008,6 +2010,8 @@ static void frontend_linux_get_env(int *argc,
"downloads", sizeof(g_defaults.dir.core_assets));
fill_pathname_join(g_defaults.dir.screenshot, base_path,
"screenshots", sizeof(g_defaults.dir.screenshot));
fill_pathname_join(g_defaults.dir.thumbnails, base_path,
"thumbnails", sizeof(g_defaults.dir.thumbnails));
#endif
}

Expand Down

0 comments on commit 7db1d20

Please sign in to comment.