projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added release notes for releases 1.4 and 1.3 to tail of NEWS.
[mmh]
/
uip
/
whatnowsbr.c
diff --git
a/uip/whatnowsbr.c
b/uip/whatnowsbr.c
index
d54877e
..
3890537
100644
(file)
--- a/
uip/whatnowsbr.c
+++ b/
uip/whatnowsbr.c
@@
-683,7
+683,7
@@
editfile (char **ed, char **arg, char *file, int use, struct msgs *mp,
*ed = defaulteditor;
}
*ed = defaulteditor;
}
- if (altmsg && atfile) {
+ if (altmsg) {
if (mp == NULL || *altmsg == '/' || cwd == NULL)
strncpy (altpath, altmsg, sizeof(altpath));
else
if (mp == NULL || *altmsg == '/' || cwd == NULL)
strncpy (altpath, altmsg, sizeof(altpath));
else
@@
-693,17
+693,19
@@
editfile (char **ed, char **arg, char *file, int use, struct msgs *mp,
else
snprintf (linkpath, sizeof(linkpath), "%s/%s", cwd, LINK);
else
snprintf (linkpath, sizeof(linkpath), "%s/%s", cwd, LINK);
- unlink (linkpath);
+ if (atfile) {
+ unlink (linkpath);
#ifdef HAVE_LSTAT
#ifdef HAVE_LSTAT
- if (link (altpath, linkpath) == NOTOK) {
- symlink (altpath, linkpath);
- slinked = 1;
- } else {
- slinked = 0;
- }
+ if (link (altpath, linkpath) == NOTOK) {
+ symlink (altpath, linkpath);
+ slinked = 1;
+ } else {
+ slinked = 0;
+ }
#else /* not HAVE_LSTAT */
#else /* not HAVE_LSTAT */
- link (altpath, linkpath);
+ link (altpath, linkpath);
#endif /* not HAVE_LSTAT */
#endif /* not HAVE_LSTAT */
+ }
}
context_save (); /* save the context file */
}
context_save (); /* save the context file */