[tracker] tracker-extract,text: Do not doubly close the FD
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-extract,text: Do not doubly close the FD
- Date: Fri, 25 Nov 2011 14:33:51 +0000 (UTC)
commit 6a4afab1228b258d155eea7a8d3fbfeca622891e
Author: Carlos Garnacho <carlos lanedo com>
Date: Fri Nov 25 15:28:13 2011 +0100
tracker-extract,text: Do not doubly close the FD
tracker_read_text_from_fd() already takes care of closing it.
src/tracker-extract/tracker-extract-text.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-text.c b/src/tracker-extract/tracker-extract-text.c
index 593a052..6a16c12 100644
--- a/src/tracker-extract/tracker-extract-text.c
+++ b/src/tracker-extract/tracker-extract-text.c
@@ -77,12 +77,12 @@ get_file_content (GFile *file,
g_debug (" Starting to read '%s' up to %" G_GSIZE_FORMAT " bytes...",
uri, n_bytes);
- /* Read up to n_bytes from stream. Output is always, always valid UTF-8 */
+ /* Read up to n_bytes from stream. Output is always, always valid UTF-8,
+ * this function closes the FD.
+ */
text = tracker_read_text_from_fd (fd,
n_bytes,
TRY_LOCALE_TO_UTF8_CONVERSION);
-
- close (fd);
g_free (uri);
g_free (path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]