From aa4eb40e7141c97ccdc02aebf3e4bf98186fe710 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Wed, 5 Jul 2006 15:20:16 +0000 Subject: [PATCH] another cosmetic fix git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3754 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- src/files.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/files.c b/src/files.c index 0323d832..d2b6ff00 100644 --- a/src/files.c +++ b/src/files.c @@ -916,7 +916,9 @@ char *get_full_path(const char *origpath) d_here = getcwd(d_here, PATH_MAX + 1); while (d_here == NULL) { - chdir(".."); + if (chdir("..") == -1) + break; + d_here = getcwd(d_here, PATH_MAX + 1); } -- 2.39.5