mirror of
https://git.proxmox.com/git/pve-common
synced 2025-08-14 09:36:41 +00: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
|
RELEASE=2.2
|
||||||
|
|
||||||
VERSION=1.0
|
VERSION=1.0
|
||||||
PKGREL=33
|
PKGREL=34
|
||||||
|
|
||||||
PACKAGE=libpve-common-perl
|
PACKAGE=libpve-common-perl
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ sub file_read_firstline {
|
|||||||
my $fh = IO::File->new ($filename, "r");
|
my $fh = IO::File->new ($filename, "r");
|
||||||
return undef if !$fh;
|
return undef if !$fh;
|
||||||
my $res = <$fh>;
|
my $res = <$fh>;
|
||||||
chomp $res;
|
chomp $res if $res;
|
||||||
$fh->close;
|
$fh->close;
|
||||||
return $res;
|
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
|
libpve-common-perl (1.0-33) unstable; urgency=low
|
||||||
|
|
||||||
* fix run_command: restore umask correctly
|
* fix run_command: restore umask correctly
|
||||||
|
Loading…
Reference in New Issue
Block a user