Fix bug, root refcount must be initialized to 1.

This commit is contained in:
Vreixo Formoso 2007-12-18 10:54:09 +01:00
parent 36894d6a23
commit 5b93cb4cdc
1 changed files with 1 additions and 0 deletions

View File

@ -578,6 +578,7 @@ int iso_node_new_root(IsoDir **root)
if (dir == NULL) { if (dir == NULL) {
return ISO_MEM_ERROR; return ISO_MEM_ERROR;
} }
dir->node.refcount = 1;
dir->node.type = LIBISO_DIR; dir->node.type = LIBISO_DIR;
dir->node.atime = dir->node.ctime = dir->node.mtime = time(NULL); dir->node.atime = dir->node.ctime = dir->node.mtime = time(NULL);
dir->node.mode = S_IFDIR | 0555; dir->node.mode = S_IFDIR | 0555;