[tracker] Remove tracker_file_unlink function



commit 569d24a794750cdc2621759990f3d6be861d92da
Author: Jürg Billeter <j bitron ch>
Date:   Wed Apr 15 14:08:07 2009 +0200

    Remove tracker_file_unlink function
    
    It is only used in one place and the encoding conversion is incorrect
    there.
---
 .../libtracker-common-sections.txt                 |    1 -
 src/libtracker-common/tracker-file-utils.c         |   13 -------------
 src/libtracker-common/tracker-file-utils.h         |    1 -
 src/libtracker-common/tracker-log.c                |    2 +-
 4 files changed, 1 insertions(+), 16 deletions(-)

diff --git a/docs/reference/libtracker-common/libtracker-common-sections.txt b/docs/reference/libtracker-common/libtracker-common-sections.txt
index fa5891d..97f51f6 100644
--- a/docs/reference/libtracker-common/libtracker-common-sections.txt
+++ b/docs/reference/libtracker-common/libtracker-common-sections.txt
@@ -115,7 +115,6 @@ tracker_file_is_directory
 tracker_file_is_indexable
 tracker_file_is_valid
 tracker_file_open
-tracker_file_unlink
 tracker_path_evaluate_name
 tracker_path_hash_table_filter_duplicates
 tracker_path_is_in_path
diff --git a/src/libtracker-common/tracker-file-utils.c b/src/libtracker-common/tracker-file-utils.c
index 9d06d7f..2cd0be3 100644
--- a/src/libtracker-common/tracker-file-utils.c
+++ b/src/libtracker-common/tracker-file-utils.c
@@ -100,19 +100,6 @@ tracker_file_close (FILE     *file,
 	fclose (file);
 }
 
-gboolean
-tracker_file_unlink (const gchar *uri)
-{
-	gchar	 *str;
-	gboolean  result;
-
-	str = g_filename_from_utf8 (uri, -1, NULL, NULL, NULL);
-	result = g_unlink (str) == 0;
-	g_free (str);
-
-	return result;
-}
-
 goffset
 tracker_file_get_size (const gchar *uri)
 {
diff --git a/src/libtracker-common/tracker-file-utils.h b/src/libtracker-common/tracker-file-utils.h
index fc4d6b1..ea1dd4e 100644
--- a/src/libtracker-common/tracker-file-utils.h
+++ b/src/libtracker-common/tracker-file-utils.h
@@ -34,7 +34,6 @@ FILE*    tracker_file_open                         (const gchar  *uri,
 						    gboolean      sequential);
 void     tracker_file_close                        (FILE         *file,
 						    gboolean      need_again_soon);
-gboolean tracker_file_unlink                       (const gchar  *uri);
 goffset  tracker_file_get_size                     (const gchar  *uri);
 guint64  tracker_file_get_mtime                    (const gchar  *uri);
 gchar *  tracker_file_get_mime_type                (const gchar  *uri);
diff --git a/src/libtracker-common/tracker-log.c b/src/libtracker-common/tracker-log.c
index 0ab882c..e96af23 100644
--- a/src/libtracker-common/tracker-log.c
+++ b/src/libtracker-common/tracker-log.c
@@ -150,7 +150,7 @@ tracker_log_init (const gchar *filename,
 	}
 
 	/* Remove previous log */
-	tracker_file_unlink (filename);
+	g_unlink (filename);
 
 	/* Open file */
 	fd = g_fopen (filename, "a");



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]