rem: dirfile = WMGetListSelectedItem(panel->dirList)->text;
add: dirfile = wexpandpath(WMGetListSelectedItem(panel->dirList)->text);
context: drawIconProc(WMList *lPtr, int index, Drawable d, char *text,	     int state, WMRect *rect) {    IconPanel *panel = WMGetHangedData(lPtr);    GC gc = panel->scr->draw_gc;    GC copygc = panel->scr->copy_gc;    char *buffer, *dirfile;    WMPixmap *pixmap;    WMColor *blackcolor;    WMColor *whitecolor;    WMSize size;    WMScreen *wmscr=WMWidgetScreen(panel->win);    int width;    if(!panel->preview) return;    width = rect->size.width;    blackcolor = WMBlackColor(wmscr);    whitecolor = WMWhiteColor(wmscr);    dirfile = WMGetListSelectedItem(panel->dirList)->text;    buffer = wmalloc(strlen(dirfile)+strlen(text)+4);    sprintf(buffer,"%s/%s" ,dirfile,text);		    pixmap = WMCreatePixmapFromFile(WMWidgetScreen(panel->win), buffer);    free(buffer);    if (!pixmap) {        WMRemoveListItem(lPtr, index);        return;    }    XClearArea(dpy, d, rect->pos.x, rect->pos.y, width, rect->size.height, 	       False);    XSetClipMask(dpy, gc, None);    /*    XDrawRectangle(dpy, d, WMColorGC(whitecolor), rect->pos.x + 5, 		   rect->pos.y +5, width - 10, 54);     */    XDrawLine(dpy, d, WMColorGC(whitecolor), rect->pos.x,	      rect->pos.y+rect->size.height-1, rect->pos.x+width, 	      rect->pos.y+rect->size.height-1);           if (state&WLDSSelected) {        XFillRectangle(dpy, d, WMColorGC(whitecolor), rect->pos.x,		       rect->pos.y, width, rect->size.height);    }    size = WMGetPixmapSize(pixmap);    XSetClipMask(dpy, copygc, WMGetPixmapMaskXID(pixmap));    XSetClipOrigin(dpy, copygc, rect->pos.x + (width-size.width)/2,		   rect->pos.y+2);    XCopyArea(dpy, WMGetPixmapXID(pixmap), d, copygc, 0, 0,	      size.width>100?100:size.width, size.height>64?64:size.height, 	      rect->pos.x + (width-size.width)/2, rect->pos.y+2);    {        int i,j;	int fheight = WMFontHeight(panel->normalfont);	int tlen = strlen(text);	int twidth = WMWidthOfString(panel->normalfont, text, tlen);	int ofx, ofy;		ofx = rect->pos.x + (width - twidth)/2;	ofy = rect->pos.y + 64 - fheight;	        for(i=-1;i<2;i++)	    for(j=-1;j<2;j++)		WMDrawString(wmscr, d, WMColorGC(whitecolor), 			     panel->normalfont, ofx+i, ofy+j,			     text, tlen);	WMDrawString(wmscr, d, WMColorGC(blackcolor), panel->normalfont, 		     ofx, ofy, text, tlen);    }    WMReleasePixmap(pixmap);    /* I hope it is better to do not use cache / on my box it is fast nuff */    XFlush(dpy);    WMReleaseColor(blackcolor);    WMReleaseColor(whitecolor);}