From: David Lawrence Ramsey Date: Wed, 5 Jul 2006 15:20:16 +0000 (+0000) Subject: another cosmetic fix X-Git-Tag: v1.9.99pre1~107 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=aa4eb40e7141c97ccdc02aebf3e4bf98186fe710;p=nano.git another cosmetic fix git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3754 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- 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); }