[tracker/tracker-0.10-no-atime: 7/23] tracker-extract, gif: Open GIF files with O_NOATIME
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.10-no-atime: 7/23] tracker-extract, gif: Open GIF files with O_NOATIME
- Date: Fri, 23 Sep 2011 11:04:15 +0000 (UTC)
commit 23f30269b4f0e0e5ab7db83dd71daaedeb6c9f69
Author: Philip Van Hoof <philip codeminded be>
Date: Wed Sep 21 17:50:40 2011 +0200
tracker-extract, gif: Open GIF files with O_NOATIME
Conflicts:
src/tracker-extract/tracker-extract-gif.c
src/tracker-extract/tracker-extract-gif.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-gif.c b/src/tracker-extract/tracker-extract-gif.c
index 52ff73c..b483c39 100644
--- a/src/tracker-extract/tracker-extract-gif.c
+++ b/src/tracker-extract/tracker-extract-gif.c
@@ -544,6 +544,8 @@ extract_gif (const gchar *uri,
goffset size;
GifFileType *gifFile = NULL;
gchar *filename;
+ FILE *f;
+ int fd;
filename = g_filename_from_uri (uri, NULL, NULL);
size = tracker_file_get_size (filename);
@@ -553,7 +555,14 @@ extract_gif (const gchar *uri,
return;
}
- if ((gifFile = DGifOpenFileName (filename)) == NULL) {
+ f = tracker_file_open (filename);
+ if (!f) {
+ return;
+ }
+
+ fd = fileno (f);
+
+ if ((gifFile = DGifOpenFileHandle (fd)) == NULL) {
PrintGifError ();
return;
}
@@ -570,6 +579,7 @@ extract_gif (const gchar *uri,
PrintGifError ();
}
+ tracker_file_close (f, FALSE);
}
TrackerExtractData *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]