From 8e6848f7b4190fb0a4890a6a177a5152c14592be Mon Sep 17 00:00:00 2001 From: John Southworth Date: Thu, 28 Apr 2011 10:41:52 -0500 Subject: verify the users intention when deleting directories since we don't have a glob --- scripts/vyatta-image-tools.pl | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) 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); -- cgit v1.2.3 From b2f8b4ac542578b86ed48a6bd8c08911bcb478a9 Mon Sep 17 00:00:00 2001 From: John Southworth Date: Thu, 28 Apr 2011 10:42:18 -0500 Subject: 0.13.112 --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) 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 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 -- cgit v1.2.3