mirror of
https://github.com/kdave/btrfs-progs
synced 2025-02-08 05:36:58 +00:00
btrfs-progs: restore: don't modify metadata in dry-run mode
In Dry run the following error appeared and aborted execution: ERROR: failed to access 'XYZ' to restore metadata/xattrs: No such file or directory Skip the metadata and xattrs handling when dry run is enabled. Signed-off-by: Holger Jakob <jakob@dsi.uni-stuttgart.de> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
5c1fb686aa
commit
7647192c23
@ -1117,7 +1117,7 @@ next:
|
||||
path.slots[0]++;
|
||||
}
|
||||
|
||||
if (restore_metadata || get_xattrs) {
|
||||
if ((restore_metadata || get_xattrs) && !dry_run) {
|
||||
snprintf(path_name, PATH_MAX, "%s%s", output_rootdir, in_dir);
|
||||
fd = open(path_name, O_RDONLY);
|
||||
if (fd < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user