We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fe8fe18 commit 1ce89e3Copy full SHA for 1ce89e3
libraries/FS/src/vfs_api.cpp
@@ -429,17 +429,14 @@ bool VFSFileImpl::seek(uint32_t pos, SeekMode mode)
429
return false;
430
}
431
432
+ fpurge(_f); //clear the file internal buffer -> no longer valid when changing file position
433
off_t res = lseek(fileno(_f), pos, mode);
434
if (res < 0) {
435
// an error occurred
436
log_d("FILE SEEK ERROR OCCURED");
437
return 1; //return error -> for seek its all above 0
438
- //return 0; //return success -> for fseek its 0
439
-
440
- //Call fseek to adjust pointer in fstruct
441
- auto rc = fseek(_f, pos, mode);
442
- return rc == 0;
+ return 0; //return success -> for fseek its 0
443
444
445
size_t VFSFileImpl::position() const
0 commit comments