diff options
| author | Daniel Friesel <derf@finalrewind.org> | 2012-09-01 19:42:11 +0200 | 
|---|---|---|
| committer | Daniel Friesel <derf@finalrewind.org> | 2012-09-01 19:42:11 +0200 | 
| commit | d3709b893f6ba8657759ad981af79ac3740e1c71 (patch) | |
| tree | 7837634aa5662e707e22bb1f7ebff0a783975ddc /src | |
| parent | 25d2a1c0e9c76fa9c37a697147cba2f944ffbb62 (diff) | |
Fix bug in thumbnail generation when used with 'feh .'
It used to save the thumbnail for /path/to/./pmage.png, now it is always
/path/to/image.png
Diffstat (limited to 'src')
| -rw-r--r-- | src/thumbnail.c | 3 | 
1 files changed, 3 insertions, 0 deletions
| 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); | 
