]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Tweak a mtree format test.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Mon, 23 Feb 2009 13:19:34 +0000 (08:19 -0500)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Mon, 23 Feb 2009 13:19:34 +0000 (08:19 -0500)
Make directories for through the routine which open
a directory in reading a mtree format.
If we don't make directories, the routine won't try
to open the directory.

SVN-Revision: 707

libarchive/test/test_read_format_mtree.c

index ef34af8f7e49738624578630693bfa63dd9fee1a..ad1b5ac6d5a1e9d3470fa7e283d2692bbdc69f4e 100644 (file)
@@ -52,6 +52,15 @@ DEFINE_TEST(test_read_format_mtree)
        struct archive_entry *ae;
        struct archive *a;
 
+       /*
+        * An access error occurred on some platform when mtree
+        * format handling open a directory. It is for through
+        * the routine which open a directory that we create
+        * "dir" and "dir2" directories.
+        */
+       assertEqualInt(0, mkdir("dir", 0775));
+       assertEqualInt(0, mkdir("dir2", 0775));
+
        assert((a = archive_read_new()) != NULL);
        assertEqualIntA(a, ARCHIVE_OK,
            archive_read_support_compression_all(a));