[gexiv2/wip/gio-fix: 1/2] gioio: Check size only once on open
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gexiv2/wip/gio-fix: 1/2] gioio: Check size only once on open
- Date: Sat, 12 Oct 2019 21:50:11 +0000 (UTC)
commit 1e4679784589c16259094bff4e04f4356cfaf89a
Author: Jens Georg <mail jensge org>
Date: Sat Oct 12 21:21:01 2019 +0200
gioio: Check size only once on open
Apparently the exiv2 code calls open/close quite often
gexiv2/gexiv2-metadata.cpp | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gexiv2/gexiv2-metadata.cpp b/gexiv2/gexiv2-metadata.cpp
index 9ea9a19..73e1538 100644
--- a/gexiv2/gexiv2-metadata.cpp
+++ b/gexiv2/gexiv2-metadata.cpp
@@ -66,6 +66,9 @@ public:
if (_seekable == nullptr)
return 0;
+ if (_size >= 0)
+ return 0;
+
auto position = tell();
seek (0, Exiv2::BasicIo::end);
_size = tell();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]