Skip to content

Commit fe8fe18

Browse files
committed
VFSFileImpl::seek - edit to call both lseek and fseek
1 parent a771214 commit fe8fe18

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: libraries/FS/src/vfs_api.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,11 @@ bool VFSFileImpl::seek(uint32_t pos, SeekMode mode)
435435
log_d("FILE SEEK ERROR OCCURED");
436436
return 1; //return error -> for seek its all above 0
437437
}
438-
return 0; //return success -> for fseek its 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;
439443
}
440444

441445
size_t VFSFileImpl::position() const

0 commit comments

Comments
 (0)