]> git.proxmox.com Git - pve-manager.git/commit
fix maxfiles behavior
authorFabian Ebner <f.ebner@proxmox.com>
Mon, 9 Nov 2020 08:56:33 +0000 (09:56 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 16 Nov 2020 17:18:32 +0000 (18:18 +0100)
commitb15bdd864ef54e2b9652edd054defe23917d6920
tree31a3f8ecad9e05ef096b3c374720533ce3c78dfb
parent5939af6bbb1cd014b05e3228075ddc40721b407d
fix maxfiles behavior

Commit b64dd8c8a56c424b4cfe8cb8ef0841e49ba38c03 hard-coded 0 as the default
for maxfiles in the --storage case, but the actual default should be the
value from read_vzdump_defaults(), which obtains the value from
/etc/vzdump.conf or the VZDump schema if the value has not been modified in
that file. The initial default from the schema is 1, not 0.
Tested on PVE 6.1 to verify that behavior.

Move the sanity check for zero-ness to where we have the final value for
maxfiles. Like this, we also have an implicit definedness check and more
importantly, it is more future-proof in case we ever allow maxfiles 0 in the
VZDump schema itself.

Also, force conversion to int to be extra safe.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/VZDump.pm