nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 1907174c5f42f6dceb4db3e45fcef5008d8bc88c
parent 4da604be5abdb5c0f1a624d62f1fb535a34bc9a0
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Wed, 26 Feb 2020 14:01:25 +0100

tweaks: drop a check for something that will not occur

The check has been there for a few months, and will be there for
five more years in the next Ubuntu LTS.

Diffstat:
Msrc/files.c | 9+--------
1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/src/files.c b/src/files.c @@ -1485,7 +1485,7 @@ bool write_file(const char *name, FILE *thefile, bool tmp, struct stat st; /* The status fields filled in by stat(). */ #endif - char *realname; + char *realname = real_dir_from_tilde(name); /* The filename after tilde expansion. */ char *tempname = NULL; /* The name of the temporary file we use when prepending. */ @@ -1496,13 +1496,6 @@ bool write_file(const char *name, FILE *thefile, bool tmp, bool retval = FALSE; /* The return value, to become TRUE when writing has succeeded. */ -#ifndef NANO_TINY - if (*name == '\0') - die("Tried to write a nameless file -- please report a bug\n"); -#endif - - realname = real_dir_from_tilde(name); - #ifdef ENABLE_OPERATINGDIR /* If we're writing a temporary file, we're probably going outside * the operating directory, so skip the operating directory test. */