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:
parent
eb9e24df41
commit
88955a2e69
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
||||
RELEASE=2.2
|
||||
|
||||
VERSION=1.0
|
||||
PKGREL=33
|
||||
PKGREL=34
|
||||
|
||||
PACKAGE=libpve-common-perl
|
||||
|
||||
|
@ -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
6
debian/changelog
vendored
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user