summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--src/thumbnail.c3
2 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 10d855c..ee6bb53 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+git HEAD
+
+ * Fix freedesktop.org Thumbnail Managing Standard implementation:
+ when running feh on the current working directory, '/path/to/./image.png'
+ was used for thumbnail name generation. Now it is always
+ '/path/to/image.png'
+
Tue, 28 Aug 2012 11:46:19 +0200 Daniel Friesel <derf+feh@finalrewind.org>
* Release v2.6
diff --git a/src/thumbnail.c b/src/thumbnail.c
index b26dc7f..c1081f3 100644
--- a/src/thumbnail.c
+++ b/src/thumbnail.c
@@ -596,6 +596,9 @@ char *feh_thumbnail_get_name_uri(char *name)
/* FIXME: add support for ~, need to investigate if it's expanded
somewhere else before adding (unecessary) code */
if (name[0] != '/') {
+ /* work around /some/path/./image.ext */
+ if ((strncmp(name, "./", 2)) == 0)
+ name += 2;
cwd = getcwd(NULL, 0);
uri = estrjoin("/", "file:/", cwd, name, NULL);
free(cwd);