lib/file: fix cutByte filesize bug
parent
d794bce288
commit
f784948c3e
|
@ -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