lib/file: fix cutByte filesize bug

broken
Shwoomple 2022-10-30 11:12:26 +05:30 committed by Gitea
parent d794bce288
commit f784948c3e
1 changed files with 1 additions and 0 deletions

View File

@ -253,6 +253,7 @@ ErrorOr<uint8_t> 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++;