lib/file: fix cutByte filesize bug
parent
ea8e806366
commit
63e1749ad1
|
@ -253,6 +253,7 @@ ErrorOr<uint8_t> File::cutByte(){
|
||||||
byte = readData[this->cursorPosition];
|
byte = readData[this->cursorPosition];
|
||||||
readData.erase(readData.begin() + this->cursorPosition);
|
readData.erase(readData.begin() + this->cursorPosition);
|
||||||
|
|
||||||
|
std::filesystem::resize_file(this->path, readData.size());
|
||||||
this->fileStream.seekg(0);
|
this->fileStream.seekg(0);
|
||||||
this->write(readData);
|
this->write(readData);
|
||||||
this->cursorPosition++;
|
this->cursorPosition++;
|
||||||
|
|
Loading…
Reference in New Issue