5
0
mirror of git://git.proxmox.com/git/pve-common.git synced 2025-02-15 13:57:21 +03:00

file_read_firstline: avoid warning with empty files

This commit is contained in:
Dietmar Maurer 2012-10-02 08:05:33 +02:00
parent eb9e24df41
commit 88955a2e69
3 changed files with 8 additions and 2 deletions

View File

@ -1,7 +1,7 @@
RELEASE=2.2
VERSION=1.0
PKGREL=33
PKGREL=34
PACKAGE=libpve-common-perl

View File

@ -173,7 +173,7 @@ sub file_read_firstline {
my $fh = IO::File->new ($filename, "r");
return undef if !$fh;
my $res = <$fh>;
chomp $res;
chomp $res if $res;
$fh->close;
return $res;
}

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
libpve-common-perl (1.0-34) unstable; urgency=low
* file_read_firstline: avoid warning with empty files
-- Proxmox Support Team <support@proxmox.com> Tue, 02 Oct 2012 08:05:10 +0200
libpve-common-perl (1.0-33) unstable; urgency=low
* fix run_command: restore umask correctly