mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-05-23 17:46:09 +00:00
remove unused function read_firstfile
This commit is contained in:
parent
aabf3adddd
commit
8e3abaf440
@ -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 = <TMP>;
|
||||
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) = @_;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user