Also don't require --force if destdir is the cwd, as documented. --- scripts/debsnap.1 | 4 +--- scripts/debsnap.pl | 6 +----- 2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/scripts/debsnap.1 b/scripts/debsnap.1 index f7e59fe..28775c3 100644 --- a/scripts/debsnap.1 +++ b/scripts/debsnap.1 @@ -37,9 +37,7 @@ insist the destination directory does not exist yet unless it is explicitly specified to be '.' (the current working directory). This is to avoid files being accidentally overwritten by what is fetched from the archive and to provide a guarantee for other scripts that only the files fetched will be -present there upon completion. Note that this option will remove the -\fIdestination\fP directory and all of its contents prior to beginning the -download. +present there upon completion. .TP .BR \-v ", " \-\-verbose diff --git a/scripts/debsnap.pl b/scripts/debsnap.pl index 3fe0738..e4dff76 100755 --- a/scripts/debsnap.pl +++ b/scripts/debsnap.pl @@ -21,7 +21,6 @@ use warnings; use LWP::Simple; use JSON -support_by_pp; use File::Basename; -use File::Path qw/remove_tree/; my $progname = basename($0); my $modified_conf_msg = ''; @@ -215,10 +214,7 @@ else { my $baseurl = "$config_vars{DEBSNAP_BASE_URL}/mr/package/$package/"; if (-d $destdir) { - if ($force_actions) { - my $verbose = 1 if $config_vars{DEBSNAP_VERBOSE} eq 'yes'; - remove_tree($destdir, { verbose => $verbose }); - mkdir($destdir); + if ($force_actions || $destdir == ".") { } else { fatal "Destination dir $destdir already exists.\nPlease (re)move it first, or use --force to overwrite."; -- 1.7.1 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org