From: René Jochum Date: Tue, 19 Jun 2018 14:59:54 +0000 (+0200) Subject: Use a different path for the lock file X-Git-Url: https://git.proxmox.com/?p=pve-client.git;a=commitdiff_plain;h=ace4a6df4b24e372064040a29f5eb3ed211157f9 Use a different path for the lock file This prevents lock_file from creating the config file with wrong permissions. --- diff --git a/PVE/APIClient/Config.pm b/PVE/APIClient/Config.pm index a4aa4c6..a783ab3 100644 --- a/PVE/APIClient/Config.pm +++ b/PVE/APIClient/Config.pm @@ -67,7 +67,10 @@ sub config_filename { sub lock_config { my ($class, $timeout, $code, @param) = @_; - my $filename = $class->config_filename(); + my $dir = PVE::APIClient::Helpers::configuration_directory(); + make_path($dir); + + my $filename = "$dir/.config.lck"; my $res = PVE::APIClient::Tools::lock_file($filename, $timeout, $code, @param);