Write can be called without cookie (in the CreateSymlink() case for example).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30907 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz 2009-05-28 21:58:42 +00:00
parent 41b1980691
commit 5740b42f36
1 changed files with 5 additions and 3 deletions

View File

@ -477,9 +477,11 @@ status_t
OverlayInode::Write(void *_cookie, off_t position, const void *buffer,
size_t *length)
{
open_cookie *cookie = (open_cookie *)_cookie;
if (cookie->open_mode & O_APPEND)
position = fStat.st_size;
if (_cookie != NULL) {
open_cookie *cookie = (open_cookie *)_cookie;
if (cookie->open_mode & O_APPEND)
position = fStat.st_size;
}
// find insertion point
write_buffer **link = &fWriteBuffers;