From 8e3abaf440c098c99fc6e5d3d7792ecbf69cffe3 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Mon, 17 Oct 2011 14:04:09 +0200 Subject: [PATCH] remove unused function read_firstfile --- PVE/VZDump.pm | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm index 075a97cc..ea4b2fcd 100644 --- a/PVE/VZDump.pm +++ b/PVE/VZDump.pm @@ -237,24 +237,6 @@ sub find_add_exclude { } } -sub read_firstfile { - my $archive = shift; - - die "ERROR: file '$archive' does not exist\n" if ! -f $archive; - - # try to detect archive type first - my $pid = open (TMP, "tar tf '$archive'|") || - die "unable to open file '$archive'\n"; - my $firstfile = ; - kill 15, $pid; - close TMP; - - die "ERROR: archive contaions no data\n" if !$firstfile; - chomp $firstfile; - - return $firstfile; -} - my $sendmail = sub { my ($self, $tasklist, $totaltime) = @_;