diff options
| author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-07-21 14:57:54 +0000 |
|---|---|---|
| committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-07-21 14:57:54 +0000 |
| commit | 6cd84dac84f72dde437790cc620c8638d3591d00 (patch) | |
| tree | 1c822ba1859d04ab9af79210d7f331207738ed7b /miscutils | |
| parent | e8feca085dbcd0fb97aa5af1a8e751affb88df48 (diff) | |
| download | busybox-w32-6cd84dac84f72dde437790cc620c8638d3591d00.tar.gz busybox-w32-6cd84dac84f72dde437790cc620c8638d3591d00.tar.bz2 busybox-w32-6cd84dac84f72dde437790cc620c8638d3591d00.zip | |
Three patches from FreeWRT people
Diffstat (limited to 'miscutils')
| -rw-r--r-- | miscutils/crontab.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/miscutils/crontab.c b/miscutils/crontab.c index 76c382e8f..69f2e3123 100644 --- a/miscutils/crontab.c +++ b/miscutils/crontab.c | |||
| @@ -296,7 +296,9 @@ static void EditFile(const char *user, const char *file) | |||
| 296 | if (ChangeUser(user, 1) < 0) | 296 | if (ChangeUser(user, 1) < 0) |
| 297 | exit(0); | 297 | exit(0); |
| 298 | ptr = getenv("VISUAL"); | 298 | ptr = getenv("VISUAL"); |
| 299 | if (ptr == NULL || strlen(ptr) > 256) | 299 | if (ptr == NULL) |
| 300 | ptr = getenv("EDITOR"); | ||
| 301 | if (ptr == NULL) | ||
| 300 | ptr = PATH_VI; | 302 | ptr = PATH_VI; |
| 301 | 303 | ||
| 302 | ptr = xasprintf("%s %s", ptr, file); | 304 | ptr = xasprintf("%s %s", ptr, file); |
