lib/file: fix cutByte filesize bug

windows
Shwoomple 2022-10-30 11:12:26 +05:30 committed by BodgeMaster
parent ea8e806366
commit 63e1749ad1
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++;