diff options
author | Guy Harris <guy@alum.mit.edu> | 2011-05-09 05:30:59 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2011-05-09 05:30:59 +0000 |
commit | 88a1ed85e3156e80c3fed4848d651aae433dc8d8 (patch) | |
tree | ab444a6fa6b32f20c68c7689470957750b11e699 /wiretap/file_wrappers.c | |
parent | 42ba70cf9c7b906c73721065e5b7425bf2ff663e (diff) |
From Jakub Zawadzki: for file read progress bars, use the raw offset in
the file, rather than the offset in the uncompressed data stream. That
way we don't get the "hey, we're more than 100% into the file, better
refigure this" surprise.
svn path=/trunk/; revision=37025
Diffstat (limited to 'wiretap/file_wrappers.c')
-rw-r--r-- | wiretap/file_wrappers.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/wiretap/file_wrappers.c b/wiretap/file_wrappers.c index 681878bd7e..ee3ead8099 100644 --- a/wiretap/file_wrappers.c +++ b/wiretap/file_wrappers.c @@ -1006,6 +1006,11 @@ file_tell(FILE_T stream) return stream->pos + (stream->seek ? stream->skip : 0); } +gint64 file_tell_raw(FILE_T stream) +{ + return stream->raw_pos; +} + int file_read(void *buf, unsigned int len, FILE_T file) { |