]> 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 67efbc85b631708653ddf8ce88dcb3df5a370c96..ac7648a372e0e6e3d7561544b71dcb92ea86aaed 100644 (file)
@@ -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);