This commit is contained in:
sp4rkie 2017-10-15 00:59:29 +02:00 committed by Fredrik Fornwall
parent 9c9d1191df
commit 2b2d23f6b9
1 changed files with 10 additions and 0 deletions

View File

@ -14,3 +14,13 @@ diff -u -r ../busybox-1.22.1/miscutils/crontab.c ./miscutils/crontab.c
ptr = getenv("VISUAL");
if (!ptr) {
ptr = getenv("EDITOR");
@@ -168,7 +168,8 @@
}
close_on_exec_on(src_fd); /* don't want editor to see this fd */
edit_file(pas, tmp_fname);
- /* fall through */
+ xrename(tmp_fname, pas->pw_name);
+ break;
case 0: /* Replace (no -l, -e, or -r were given) */
new_fname = xasprintf("%s.new", pas->pw_name);