mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-13 16:37:27 +00:00
Getting size of cache file should not change its position
This commit is contained in:
parent
6958803fec
commit
7d685fc98b
1 changed files with 4 additions and 1 deletions
|
|
@ -122,7 +122,10 @@ open_cache_file(const char *cache_path) {
|
|||
|
||||
static off_t
|
||||
size_of_cache_file(DiskCache *self) {
|
||||
return lseek(self->cache_file_fd, 0, SEEK_END);
|
||||
off_t pos = lseek(self->cache_file_fd, 0, SEEK_CUR);
|
||||
off_t ans = lseek(self->cache_file_fd, 0, SEEK_END);
|
||||
lseek(self->cache_file_fd, pos, SEEK_SET);
|
||||
return ans;
|
||||
}
|
||||
|
||||
size_t
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue