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.wagner@proxmox.com>
[FE: use flag parameter instead of encoding as a string]
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
}
sub cfs_write_file {
- my ($filename, $data) = @_;
+ my ($filename, $data, $force_utf8) = @_;
my ($version, $info) = cfs_file_version($filename);
$ci->{version} = undef;
}
- PVE::Tools::file_set_contents($fsname, $raw);
+ PVE::Tools::file_set_contents($fsname, $raw, undef, 1);
}
my $cfs_lock = sub {