commit aa4eb40e7141c97ccdc02aebf3e4bf98186fe710
parent 19cb1e6de6bb6b8e931bd23d59ef961770510040
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date: Wed, 5 Jul 2006 15:20:16 +0000
another cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3754 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git 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);
}