quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Quilt-dev] [PATCH 22/39] backup-files: Check if backup exists


From: Jean Delvare
Subject: [Quilt-dev] [PATCH 22/39] backup-files: Check if backup exists
Date: Sat, 19 Mar 2011 10:52:52 +0100
User-agent: quilt/0.48-17.1

Make sure that a backup exists before attempting any action which
reads the file list from it.

Signed-off-by: Jean Delvare <address@hidden>
Reviewed-by: Raphael Hertzog <address@hidden>
---
 quilt/scripts/backup-files.in |    5 +++++
 1 file changed, 5 insertions(+)

--- a/quilt/scripts/backup-files.in
+++ b/quilt/scripts/backup-files.in
@@ -205,6 +205,11 @@ if [ "${OPT_PREFIX:(-1)}" != / ]; then
        exit 1
 fi
 
+if [ "$1" = - ] && [ ! -d "$OPT_PREFIX" ]; then
+       echo "Backup is missing" >&2
+       exit 1
+fi
+
 if [ -n "$OPT_FILE" ]; then
        cat "$OPT_FILE" \
        | while read nextfile; do




reply via email to

[Prev in Thread] Current Thread [Next in Thread]