mirror of
https://git.proxmox.com/git/pve-common
synced 2025-04-29 07:09:36 +00:00
safe_read_from: bump default size limit to 512k
this is (via file_get_contents and file_copy) used for reading from pmxcfs, which has a file size limit of 512k. since quite a number of call sites would need to explicitly override this (and then get updated if we bump the limit on the pmxcfs side again in the future), making our default file reader compatible by default seems the better solution. Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
9025031b10
commit
8fb28ab914
@ -288,7 +288,8 @@ sub file_read_firstline {
|
||||
sub safe_read_from {
|
||||
my ($fh, $max, $oneline, $filename) = @_;
|
||||
|
||||
$max = 32768 if !$max;
|
||||
# pmxcfs file size limit
|
||||
$max = 512*1024 if !$max;
|
||||
|
||||
my $subject = defined($filename) ? "file '$filename'" : 'input';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user