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.
master
Benno Schulenberg 2020-02-26 14:01:25 +01:00
parent 4da604be5a
commit 1907174c5f
1 changed files with 1 additions and 8 deletions

View File

@ -1485,7 +1485,7 @@ bool write_file(const char *name, FILE *thefile, bool tmp,
struct stat st; struct stat st;
/* The status fields filled in by stat(). */ /* The status fields filled in by stat(). */
#endif #endif
char *realname; char *realname = real_dir_from_tilde(name);
/* The filename after tilde expansion. */ /* The filename after tilde expansion. */
char *tempname = NULL; char *tempname = NULL;
/* The name of the temporary file we use when prepending. */ /* 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; bool retval = FALSE;
/* The return value, to become TRUE when writing has succeeded. */ /* 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 #ifdef ENABLE_OPERATINGDIR
/* If we're writing a temporary file, we're probably going outside /* If we're writing a temporary file, we're probably going outside
* the operating directory, so skip the operating directory test. */ * the operating directory, so skip the operating directory test. */