summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog7
-rwxr-xr-xscripts/vyatta-image-tools.pl16
2 files changed, 20 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog
index fefc01c..2fef2e0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+vyatta-op (0.13.112) unstable; urgency=low
+
+ * verify the users intention when deleting directories since we don't
+ have a glob
+
+ -- John Southworth <john.southworth@vyatta.com> Thu, 28 Apr 2011 10:42:16 -0500
+
vyatta-op (0.13.111) unstable; urgency=low
* Add options when copying a directory to another directory
diff --git a/scripts/vyatta-image-tools.pl b/scripts/vyatta-image-tools.pl
index b343214..946d817 100755
--- a/scripts/vyatta-image-tools.pl
+++ b/scripts/vyatta-image-tools.pl
@@ -80,9 +80,19 @@ sub delete_file {
}
if (-d $file){
my $print_dir = conv_file_to_rel($topdir,$file);
- if (y_or_n("Do you want to erase the entire $print_dir directory?")){
- system("rm -rf $file");
- print("Directory erased\n");
+ print "This is a directory. Would you like to delete:\n"
+ ." Entire directory (D)\n"
+ ." Files in directory (F): ";
+ my $answer = <>;
+ if ($answer =~ /F|f/){
+ system("rm -rf $file/*");
+ } elsif ($answer =~ /D|d/){
+ if (y_or_n("Do you want to erase the entire $print_dir directory?")){
+ system("rm -rf $file");
+ print("Directory erased\n");
+ }
+ } else {
+ print "Unsupported operation\n";
}
} elsif (-f $file) {
my $print_file = conv_file_to_rel($topdir,$file);