Index: file.c =================================================================== RCS file: /cvsroot/xmakemol/xmakemol/file.c,v retrieving revision 1.168 diff -u -r1.168 file.c --- file.c 23 May 2004 10:47:01 -0000 1.168 +++ file.c 11 Dec 2004 12:36:03 -0000 @@ -2788,7 +2788,12 @@ xpm_attrib.colormap = cmap; /* Write file while dealing with possible errors. */ - retcode = XpmWriteFileFromPixmap(display,file_name,canvas_pm,0,&xpm_attrib); + retcode = XpmWriteFileFromPixmap (display, + gnu_basename (file_name), + canvas_pm, + 0, + &xpm_attrib); + if (retcode == XpmSuccess) { if (!quiet) { @@ -2799,7 +2804,7 @@ } else if (retcode == XpmOpenFailed) { - sprintf(string, "Cannot open %s for write", file_name); + sprintf (string, "Cannot open %s for write", gnu_basename (file_name)); echo_to_message_area(string); ok = /*failure*/0; }