]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/src/lib9p/file.c
make bind(2) error handling consistent
[plan9front.git] / sys / src / lib9p / file.c
index b2e726cbfd7a38b407c37a87d86f2e68ca327237..eddef7e4c6c92a46180f7c1c13f4cdeb91601ac8 100644 (file)
@@ -337,8 +337,9 @@ alloctree(char *uid, char *gid, ulong mode, void (*destroy)(File*))
 
        incref(f);
        t->root = f;
-       t->qidgen = 0;
-       t->dirqidgen = 1;
+
+       /* t->qidgen starts at 1 because root Qid.path is 0 */
+       t->qidgen = 1;
        if(destroy == nil)
                destroy = nop;
        t->destroy = destroy;