Close files before deleting them for compatibility with MS-Windows
authorJ. Ali Harlow <ali@juiblex.co.uk>
Fri, 9 Jan 2009 16:35:09 +0000 (16:35 +0000)
committerJ. Ali Harlow <ali@juiblex.co.uk>
Fri, 9 Jan 2009 16:35:09 +0000 (16:35 +0000)
librazor/root.c

index 87fb2d5..d06bca4 100644 (file)
@@ -230,8 +230,8 @@ razor_root_close(struct razor_root *root)
        assert (root != NULL);
 
        razor_set_destroy(root->system);
-       unlink(root->new_path);
        close(root->fd);
+       unlink(root->new_path);
        free(root);
 
        return 0;