From 849970ecdee0664ff43bfe8e0ac3ce8ad66f201c Mon Sep 17 00:00:00 2001 From: Shwoomple <> Date: Sun, 30 Oct 2022 11:12:26 +0530 Subject: [PATCH] lib/file: fix cutByte filesize bug --- src/lib/file.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/file.cpp b/src/lib/file.cpp index 92be7a5..acb8e38 100644 --- a/src/lib/file.cpp +++ b/src/lib/file.cpp @@ -253,6 +253,7 @@ ErrorOr File::cutByte(){ byte = readData[this->cursorPosition]; readData.erase(readData.begin() + this->cursorPosition); + std::filesystem::resize_file(this->path, readData.size()); this->fileStream.seekg(0); this->write(readData); this->cursorPosition++;