]> wimlib.net Git - wimlib/blobdiff - src/ntfs-3g_capture.c
Win32: Fix drive root detection with \\?\-style paths
[wimlib] / src / ntfs-3g_capture.c
index 757c9d3ee42a04c94037344525b91e714449fff5..f59292924f75afa5b2f1b0de9020fd47e34de7f2 100644 (file)
@@ -267,13 +267,18 @@ capture_ntfs_streams(struct wim_inode *inode,
                        /* Unnamed data stream.  Put the reference to it in the
                         * dentry's inode. */
                        if (inode->i_lte) {
-                               ERROR("Found two un-named data streams for `%s'",
-                                     path);
-                               ret = WIMLIB_ERR_NTFS_3G;
-                               goto out_free_lte;
+                               if (lte) {
+                                       ERROR("Found two un-named data streams for \"%s\" "
+                                             "(sizes = %"PRIu64", %"PRIu64")",
+                                             path, wim_resource_size(inode->i_lte),
+                                             wim_resource_size(lte));
+                                       ret = WIMLIB_ERR_NTFS_3G;
+                                       goto out_free_lte;
+                               }
+                       } else {
+                               stream_id = 0;
+                               inode->i_lte = lte;
                        }
-                       stream_id = 0;
-                       inode->i_lte = lte;
                } else {
                        /* Named data stream.  Put the reference to it in the
                         * alternate data stream entries */
@@ -510,8 +515,12 @@ wim_ntfs_capture_filldir(void *dirent, const ntfschar *name,
         * directory tree rooted at it */
        ntfs_inode *ni = ntfs_inode_open(ctx->dir_ni->vol, mref);
        if (!ni) {
-               ERROR_WITH_ERRNO("Failed to open NTFS inode");
-               ret = -1;
+               /* XXX This used to be treated as an error, but NTFS-3g seemed
+                * to be unable to read some inodes on a Windows 8 image for
+                * some reason. */
+               WARNING_WITH_ERRNO("Failed to open NTFS file \"%s/%s\"",
+                                  ctx->path, mbs_name);
+               ret = 0;
                goto out_free_mbs_name;
        }
        path_len = ctx->path_len;