lib/file: fix cutByte filesize bug

Shwoomple 2022-10-30 11:12:26 +05:30
parent 38fad56965
commit 849970ecde
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++;