From: dpavlin Date: Mon, 30 Jan 2006 15:16:45 +0000 (+0000) Subject: remove directories also X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=commitdiff_plain;h=bb7a9cdb3a49dc29ffc2161da05956b53681a509 remove directories also git-svn-id: svn+ssh://llin/home/dpavlin/private/svn/BackupPC/trunk@321 8392b6e1-25fa-0310-8288-cc32f8e212ea --- diff --git a/bin/BackupPC_burnArchiveCLI b/bin/BackupPC_burnArchiveCLI index 90bd03b..d149834 100755 --- a/bin/BackupPC_burnArchiveCLI +++ b/bin/BackupPC_burnArchiveCLI @@ -278,8 +278,13 @@ sub delete_dvd($) { # remove files for this DVD map { - print "\tremoving $_\n"; - unlink($_) || die "can't rm $_: $!"; + if (-d $_) { + print "\tremoving dir $_\n"; + rmtree($_) || die "can't rmtree $_: $!"; + } else { + print "\tremoving $_\n"; + unlink($_) || die "can't rm $_: $!"; + } } glob ( "/$iso_dir/$dvd_nr.*" ); $dbh->commit;