Since this function is used to store utf8-encoded strings that come from Rust, we need to be able to save the file in proper utf8 encoding as well.
Signed-off-by: Lukas Wagner <l.wag...@proxmox.com> --- src/PVE/Cluster.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PVE/Cluster.pm b/src/PVE/Cluster.pm index e3705b6..9fdc23d 100644 --- a/src/PVE/Cluster.pm +++ b/src/PVE/Cluster.pm @@ -578,7 +578,7 @@ sub cfs_read_file { } sub cfs_write_file { - my ($filename, $data) = @_; + my ($filename, $data, $encoding) = @_; my ($version, $info) = cfs_file_version($filename); @@ -592,7 +592,7 @@ sub cfs_write_file { $ci->{version} = undef; } - PVE::Tools::file_set_contents($fsname, $raw); + PVE::Tools::file_set_contents($fsname, $raw, undef, $encoding); } my $cfs_lock = sub { -- 2.39.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel