From a4e85e62ff2527e9b0be1325b1cf223f60ae2f9b Mon Sep 17 00:00:00 2001 From: Philippe Daouadi Date: Fri, 7 Jul 2023 21:28:51 +0200 Subject: [PATCH] pkgi_save: truncate files --- src/vitafile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vitafile.cpp b/src/vitafile.cpp index 53b82531..221e8918 100644 --- a/src/vitafile.cpp +++ b/src/vitafile.cpp @@ -213,7 +213,7 @@ std::vector pkgi_load(const std::string& path) void pkgi_save(const std::string& path, const void* data, uint32_t size) { SceUID fd = sceIoOpen( - path.c_str(), SCE_O_WRONLY | SCE_O_CREAT /* | SCE_O_TRUNC */, 0777); + path.c_str(), SCE_O_WRONLY | SCE_O_CREAT | SCE_O_TRUNC, 0777); if (fd < 0) throw std::runtime_error(fmt::format( "sceIoOpen({}) failed:\n{:#08x}",