From fd051ca33ea39a60c0ad6857c62de0b6bc6ab5b0 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Tue, 11 Feb 2003 19:11:36 +0000 Subject: [PATCH] * cmd.c (edit_cmd_new): Call editor with NULL argiment, not with an empty string. nvi won't save the file if invoked with an empty argument. (execute_with_vfs_arg): Don't call vfs_file_is_local() on NULL. Reported by Adam Byrtek --- src/ChangeLog | 8 ++++++++ src/cmd.c | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 1c7a32645..8e5f38c8c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2003-02-11 Pavel Roskin + + * cmd.c (edit_cmd_new): Call editor with NULL argiment, not with + an empty string. nvi won't save the file if invoked with an + empty argument. + (execute_with_vfs_arg): Don't call vfs_file_is_local() on NULL. + Reported by Adam Byrtek + 2003-02-04 Pavel Roskin * cmd.c (get_random_hint): Add "force" argument to ignore diff --git a/src/cmd.c b/src/cmd.c index be6327697..a35848a94 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -97,7 +97,7 @@ execute_with_vfs_arg (const char *command, const char *filename) time_t mtime; /* Simplest case, this file is local */ - if (vfs_file_is_local (filename)) { + if (!filename || vfs_file_is_local (filename)) { execute_internal (command, filename); return; } @@ -348,7 +348,7 @@ edit_cmd (void) void edit_cmd_new (void) { - do_edit (""); + do_edit (NULL); } /* Invoked by F5. Copy, default to the other panel. */