--- hdrline.c.BACKUP Sat May 22 19:16:30 2004 +++ hdrline.c Mon May 24 21:02:38 2004 @@ -279,10 +279,29 @@ /* fall through if 'B' returns nothing */ case 'b': +/* + if(hdr->path) + { + if ((p = strrchr (hdr->path, '/'))) + strfcpy (dest, p + 1, destlen); + else + strfcpy (dest, hdr->path, destlen); + } + else + */ if(ctx) { if ((p = strrchr (ctx->path, '/'))) + { strfcpy (dest, p + 1, destlen); + if (!(*(p + 1))) + { + strfcpy (buf2, strchr (ctx->path, '/'), sizeof(buf2)); + buf2[p - ctx->path] = 0; + if ((p = strrchr (buf2, '/'))) + strfcpy (dest, p + 1, destlen); + } + } else strfcpy (dest, ctx->path, destlen); }