]> git.wh0rd.org Git - nano.git/commitdiff
another cosmetic fix
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Wed, 5 Jul 2006 15:20:16 +0000 (15:20 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Wed, 5 Jul 2006 15:20:16 +0000 (15:20 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3754 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

src/files.c

index 0323d83251b596d52f291ed0282409f6603c9879..d2b6ff00743ecd1f7c697770485ec0292af1e77c 100644 (file)
@@ -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);
     }