]> wimlib.net Git - wimlib/blobdiff - src/ntfs-capture.c
ntfs capture: can no longer get DOS name from multi-linked files
[wimlib] / src / ntfs-capture.c
index 5662572b30929615413333986344547657bd06e3..ac7648a372e0e6e3d7561544b71dcb92ea86aaed 100644 (file)
@@ -340,7 +340,7 @@ static int capture_ntfs_streams(struct wim_dentry *dentry, ntfs_inode *ni,
                                        lte->resource_entry.size = data_size;
                                }
                                ntfs_loc = NULL;
-                               DEBUG("Add resource for `%s' (size = %zu)",
+                               DEBUG("Add resource for `%s' (size = %"PRIu64")",
                                      dentry->file_name_utf8,
                                      lte->resource_entry.original_size);
                                copy_hash(lte->hash, attr_hash);
@@ -575,13 +575,16 @@ static int build_dentry_tree_ntfs_recursive(struct wim_dentry **root_p,
                        if (ret != 0)
                                return ret;
                } else {
+                       if (
                #ifdef ENODATA
-                       if (errno != ENODATA) {
+                           errno != ENODATA &&
+               #endif
+                           errno != EMLINK
+                           ) {
                                ERROR_WITH_ERRNO("Error getting DOS name "
                                                 "of `%s'", path);
                                return WIMLIB_ERR_NTFS_3G;
                        }
-               #endif
                }
        }
 
@@ -678,7 +681,13 @@ int build_dentry_tree_ntfs(struct wim_dentry **root_p,
 
        DEBUG("Mounting NTFS volume `%s' read-only", device);
 
+#ifdef HAVE_NTFS_MNT_RDONLY
+       /* NTFS-3g 2013 */
+       vol = ntfs_mount(device, NTFS_MNT_RDONLY);
+#else
+       /* NTFS-3g 2011, 2012 */
        vol = ntfs_mount(device, MS_RDONLY);
+#endif
        if (!vol) {
                ERROR_WITH_ERRNO("Failed to mount NTFS volume `%s' read-only",
                                 device);