answer_len = strlen(answer);
- /* Convert newlines to nulls, just before we execute a
- * command. */
+ /* Convert newlines to nulls, just before we insert a file
+ * or execute a command. */
sunder(answer);
#ifndef NANO_TINY
if (!tmp)
titlebar(NULL);
- realname = mallocstrcpy(NULL, name);
-
- /* Convert newlines to nulls, just before we get the tilde-expanded
- * filename. */
- sunder(realname);
-
- if (realname[0] == '\0')
- goto cleanup_and_exit;
-
- realname = mallocstrassn(realname, real_dir_from_tilde(realname));
+ realname = real_dir_from_tilde(name);
#ifndef DISABLE_OPERATINGDIR
/* If we're writing a temporary file, we're probably going outside