The mass link/copy will create the required directories by itself if it succeeds. As files being removed don't require the creation of a directory, this means we can move the creation of the directories to the case where non-empty files have to be processed individually.
Signed-off-by: Jean Delvare <[email protected]> Reviewed-by: Raphael Hertzog <[email protected]> --- quilt/scripts/backup-files.in | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) --- a/quilt/scripts/backup-files.in +++ b/quilt/scripts/backup-files.in @@ -144,12 +144,6 @@ restore_all() { local EMPTY_FILES NONEMPTY_FILES - (cd "$OPT_PREFIX" && find . -type d -print0) \ - | xargs -0 mkdir -p - if [ ${PIPESTATUS[0]} != 0 ]; then - return 1 - fi - # Store the list of files to process EMPTY_FILES=$(gen_tempfile) NONEMPTY_FILES=$(gen_tempfile) @@ -185,6 +179,9 @@ restore_all() $ECHO "Restoring ${REPLY#./}" done < "$NONEMPTY_FILES" else + (cd "$OPT_PREFIX" && find . -type d -print0) \ + | xargs -0 mkdir -p + xargs -0 rm -f < "$NONEMPTY_FILES" while read -d $'\0' -r _______________________________________________ Quilt-dev mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/quilt-dev
