nano

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

commit 89eb5a96fb540698f7508069bb5f6973d2afea0a
parent d23dcc5a257e5e056ca84d2ea4159d35cbc3bc3b
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date:   Wed,  8 Nov 2006 13:03:37 +0000

simplify still more


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3947 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

Diffstat:
Msrc/files.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/files.c b/src/files.c @@ -1874,11 +1874,13 @@ int do_writeout(bool exiting) bool different_name = (strcmp(full_answer, full_filename) != 0); struct stat st; - bool name_exists = (stat(full_answer, &st) != -1); + bool name_exists; free(full_filename); free(full_answer); + name_exists = (stat(answer, &st) != -1); + if (different_name) { if (name_exists) { /* If we're using restricted mode, we aren't