diff options
author | sdagley%netscape.com <devnull@localhost> | 1999-05-20 01:25:54 +0000 |
---|---|---|
committer | sdagley%netscape.com <devnull@localhost> | 1999-05-20 01:25:54 +0000 |
commit | 7d9d3b192d21136d53ead6bb84c06eb6b9fef3e7 (patch) | |
tree | 2899e826c2054b5a780e89ef89e4216d4358350f | |
parent | 8d5448599928099838d05a264f2cb101003e6f4a (diff) | |
download | nspr-hg-7d9d3b192d21136d53ead6bb84c06eb6b9fef3e7.tar.gz |
Fix bug #3534. Now set EOF and file position to requested offset in a seek when the offset is past the current EOF. With this fix pinkerton's workaround in reg.c is no longer required si it has been removed. Reviewed pinkerton, approved chofmann.
-rw-r--r-- | pr/src/md/mac/macio.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pr/src/md/mac/macio.c b/pr/src/md/mac/macio.c index 9470e17b..87a7717b 100644 --- a/pr/src/md/mac/macio.c +++ b/pr/src/md/mac/macio.c @@ -437,10 +437,14 @@ PRInt32 _MD_LSeek(PRFileDesc *fd, PRInt32 offset, PRSeekWhence how) } /* set the new mark and extend the file if seeking beyond current EOF */ + /* making sure to set the mark after any required extend */ if (err == noErr) { err = SetFPos(refNum, fsFromStart, endPos); if (err == eofErr) { err = SetEOF(refNum, endPos); + if (err == noErr) { + err = SetFPos(refNum, fsFromStart, endPos); + } } } |