dest = capture_fixup_absolute_symlink(dest,
params->capture_root_ino,
params->capture_root_dev);
- if (!dest) {
- WARNING("Ignoring out of tree absolute symlink "
- "\"%s\" -> \"%s\"\n"
- " (Use --norpfix to capture "
- "absolute symlinks as-is)",
- path, deref_name_buf);
+ if (dest == NULL) {
+ /* 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 = path;
+ params->progress.scan.symlink_target = deref_name_buf;
+ do_capture_progress(params,
+ WIMLIB_SCAN_DENTRY_EXCLUDED_SYMLINK,
+ NULL);
return 0;
}
inode->i_not_rpfixed = 0;
{
struct wim_dentry *root = NULL;
int ret;
- struct wim_inode *inode;
+ struct wim_inode *inode = NULL;
struct stat stbuf;
if (exclude_path(path, path_len, params->config, true)) {
- params->progress.scan.cur_path = path;
- do_capture_progress(params, WIMLIB_SCAN_DENTRY_EXCLUDED, NULL);
ret = 0;
- goto out;
+ goto out_progress;
}
if ((params->add_flags & WIMLIB_ADD_FLAG_DEREFERENCE) ||
if (inode->i_nlink > 1) {
/* Already captured this inode? */
ret = 0;
- goto out_progress_ok;
+ goto out_progress;
}
#ifdef HAVE_STAT_NANOSECOND_PRECISION
inode, params->lookup_table);
else if (S_ISDIR(stbuf.st_mode))
ret = unix_capture_directory(root, path, path_len, params);
- else
+ else {
ret = unix_capture_symlink(&root, path, inode, params);
+ if (root == NULL)
+ goto out;
+ }
if (ret)
goto out;
-out_progress_ok:
+out_progress:
params->progress.scan.cur_path = path;
- do_capture_progress(params, WIMLIB_SCAN_DENTRY_OK, inode);
+ if (root == NULL)
+ do_capture_progress(params, WIMLIB_SCAN_DENTRY_EXCLUDED, NULL);
+ else
+ do_capture_progress(params, WIMLIB_SCAN_DENTRY_OK, inode);
out:
if (ret)
free_dentry_tree(root, params->lookup_table);