X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fcarousel.c;h=25fb5292d08a9203ad5c772390541369f3ac3d17;hb=ec8d2b32b63649e6d32bdfb306eda062769af823;hp=9b512646e2fcf0d5154d6ebcab2d4f1823563f99;hpb=5f9c47ca98dd43d8f59b7c27d3fde6edfde4fe21;p=xscreensaver diff --git a/hacks/glx/carousel.c b/hacks/glx/carousel.c index 9b512646..25fb5292 100644 --- a/hacks/glx/carousel.c +++ b/hacks/glx/carousel.c @@ -285,15 +285,14 @@ image_loaded_cb (const char *filename, XRectangle *geom, free (frame->loading.title); frame->loading.title = (filename ? strdup (filename) : 0); -# if 0 /* xscreensaver-getimage returns paths relative to the image directory - now, so leave the sub-directory part in. - */ - if (frame->loading.title) /* strip filename to part after last /. */ - { + /* xscreensaver-getimage returns paths relative to the image directory + now, so leave the sub-directory part in. Unless it's an absolute path. + */ + if (frame->loading.title && frame->loading.title[0] == '/') + { /* strip filename to part after last /. */ char *s = strrchr (frame->loading.title, '/'); if (s) strcpy (frame->loading.title, s+1); } -# endif /* 0 */ if (debug_p) fprintf (stderr, "%s: loaded %4d x %-4d %4d x %-4d \"%s\"\n",