mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 19:55:10 +00:00
FileDescriptor: It's actually okay to seek past the end of a file. :^)
This commit is contained in:
parent
7900da9667
commit
959c8f287c
1 changed files with 2 additions and 1 deletions
|
@ -150,8 +150,9 @@ off_t FileDescriptor::seek(off_t offset, int whence)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (newOffset < 0 || newOffset > metadata.size)
|
||||
if (newOffset < 0)
|
||||
return -EINVAL;
|
||||
// FIXME: Return -EINVAL if attempting to seek past the end of a seekable device.
|
||||
|
||||
m_current_offset = newOffset;
|
||||
return m_current_offset;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue