- dest = unix_fixup_abslink(dest,
- params->capture_root_ino,
- params->capture_root_dev);
- if (!dest) {
- /* RPFIX (reparse point fixup) mode: Ignore
- * absolute symbolic link that points out of the
- * tree to be captured. */
- free_dentry(*root_p);
- *root_p = NULL;
- params->progress.scan.cur_path = full_path;
- params->progress.scan.symlink_target = deref_name_buf;
- do_capture_progress(params,
- WIMLIB_SCAN_DENTRY_EXCLUDED_SYMLINK,
- NULL);
- return 0;
+ char *fixed_dest;
+
+ /* RPFIX (reparse point fixup) mode: Change target of absolute
+ * symbolic link to be "absolute" relative to the tree being
+ * captured. */
+ fixed_dest = unix_fixup_abslink(dest,
+ params->capture_root_ino,
+ params->capture_root_dev);
+ params->progress.scan.cur_path = full_path;
+ params->progress.scan.symlink_target = deref_name_buf;
+ if (fixed_dest) {
+ /* Link points inside the tree being captured, so it was
+ * fixed. */
+ inode->i_not_rpfixed = 0;
+ dest = fixed_dest;
+ ret = do_capture_progress(params,
+ WIMLIB_SCAN_DENTRY_FIXED_SYMLINK,
+ NULL);
+ } else {
+ /* Link points outside the tree being captured, so it
+ * was not fixed. */
+ ret = do_capture_progress(params,
+ WIMLIB_SCAN_DENTRY_NOT_FIXED_SYMLINK,
+ NULL);