diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2022-08-09 13:54:53 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2022-08-09 13:55:17 +0200 |
commit | 4697a56760e55f137fe4f09848bbd2aa1019da82 (patch) | |
tree | 8b58742e7f5b4cb8b2195c5ad42fa2ab661601d4 | |
parent | 4e11970a7eb852010fe609ef155d580ae415e54c (diff) | |
download | fiv-4697a56760e55f137fe4f09848bbd2aa1019da82.tar.gz fiv-4697a56760e55f137fe4f09848bbd2aa1019da82.tar.xz fiv-4697a56760e55f137fe4f09848bbd2aa1019da82.zip |
Use cleaner paths when looking up thumbnails
-rw-r--r-- | fiv-thumbnail.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fiv-thumbnail.c b/fiv-thumbnail.c index 803296c..f95ed70 100644 --- a/fiv-thumbnail.c +++ b/fiv-thumbnail.c @@ -657,8 +657,8 @@ fiv_thumbnail_lookup(const char *uri, gint64 mtime_msec, FivThumbnailSize size) use = FIV_THUMBNAIL_SIZE_MAX - i; const char *name = fiv_thumbnail_sizes[use].thumbnail_spec_name; - gchar *wide = - g_strdup_printf("%s/wide-%s/%s.webp", thumbnails_dir, name, sum); + gchar *wide = g_strconcat(thumbnails_dir, G_DIR_SEPARATOR_S "wide-", + name, G_DIR_SEPARATOR_S, sum, ".webp", NULL); result = read_wide_thumbnail(wide, uri, mtime_msec / 1000, &error); if (error) { g_debug("%s: %s", wide, error->message); @@ -673,8 +673,8 @@ fiv_thumbnail_lookup(const char *uri, gint64 mtime_msec, FivThumbnailSize size) break; } - gchar *path = - g_strdup_printf("%s/%s/%s.png", thumbnails_dir, name, sum); + gchar *path = g_strconcat(thumbnails_dir, G_DIR_SEPARATOR_S, + name, G_DIR_SEPARATOR_S, sum, ".png", NULL); result = read_png_thumbnail(path, uri, mtime_msec / 1000, &error); if (error) { g_debug("%s: %s", path, error->message); |