Use the return value for error check
authorLaszlo Papp <ext-laszlo.papp@nokia.com>
Tue, 22 Mar 2011 11:38:29 +0000 (13:38 +0200)
committerMiklos Szeredi <mszeredi@suse.cz>
Wed, 30 Mar 2011 17:34:58 +0000 (19:34 +0200)
lib/fuse.c

index 32ef6e08b405e910ed32b8ab43a54b9e599b93f0..9115af78deb03249aae567a0393e4e4e55fcb02e 100644 (file)
@@ -2203,10 +2203,9 @@ static char *hidden_name(struct fuse *f, fuse_ino_t dir, const char *oldname,
                        newnode = lookup_node(f, dir, newname);
                } while(newnode);
 
-               try_get_path(f, dir, newname, &newpath, NULL, 0);
+               res = try_get_path(f, dir, newname, &newpath, NULL, 0);
                pthread_mutex_unlock(&f->lock);
-
-               if (!newpath)
+               if (res)
                        break;
 
                res = fuse_fs_getattr(f->fs, newpath, &buf);