diff --git a/mvwrap/mvwrap b/mvwrap/mvwrap index 6f02718..f0c2b1f 100755 --- a/mvwrap/mvwrap +++ b/mvwrap/mvwrap @@ -132,15 +132,19 @@ sub pattern_edit { sub run_checks { my $line; unless ( scalar(@source) == scalar(@target) ) { + if ( -e ".mv_wrap" ) { unlink (".mv_wrap"); } die "Aborting. Source and target list don't have the same number of lines.\n"; } foreach $line (@target) { if ( $line =~ m/^$/ ) { - die "Aborting. You can't move to empy names.\n"; } + if ( -e ".mv_wrap" ) { unlink (".mv_wrap"); } + die "Aborting. You can't move to empy names.\n"; + } } if ( &check_unique(@target) ) { + if ( -e ".mv_wrap" ) { unlink (".mv_wrap"); } die "Aborting. You're trying to move multiple files to the same name.\n"; } }