Mercurial > hg > xemacs-beta
comparison src/dumper.c @ 1466:88a2f43560bf
[xemacs-hg @ 2003-05-09 01:41:56 by youngs]
2003-05-09 Martin Buchholz <martin@xemacs.org>
* dumper.c (pdump_load): Pdump'ed XEmacs can't find its .dmp file.
Scenario: Prepend ~/bin to PATH; then `mkdir ~/bin/xemacs'
Result: "temacs can only be run in -batch mode."
Fix: Check xemacs executable candidate for directory-ness.
author | youngs |
---|---|
date | Fri, 09 May 2003 01:41:56 +0000 |
parents | 1b0339b048ce |
children | a72f7bf813c9 |
comparison
equal
deleted
inserted
replaced
1465:1adfc587e790 | 1466:88a2f43560bf |
---|---|
1593 { | 1593 { |
1594 *w++ = '/'; | 1594 *w++ = '/'; |
1595 } | 1595 } |
1596 strcpy (w, name); | 1596 strcpy (w, name); |
1597 | 1597 |
1598 if (!access (exe_path, X_OK)) | 1598 #undef access /* avoid !@#$%^& encapsulated access */ |
1599 break; | 1599 #undef stat /* avoid !@#$%^& encapsulated stat */ |
1600 | |
1601 { | |
1602 struct stat statbuf; | |
1603 if (access (exe_path, X_OK) == 0 | |
1604 && stat (exe_path, &statbuf) == 0 | |
1605 && ! S_ISDIR (statbuf.st_mode)) | |
1606 break; | |
1607 } | |
1608 | |
1600 if (!*p) | 1609 if (!*p) |
1601 { | 1610 { |
1602 /* Oh well, let's have some kind of default */ | 1611 /* Oh well, let's have some kind of default */ |
1603 sprintf (exe_path, "./%s", name); | 1612 sprintf (exe_path, "./%s", name); |
1604 break; | 1613 break; |