commit cf622fc9bca469bb0b1a5f44dde1a01473b490be
Author: Christophe Fergeau <[email protected]>
Date:   Sun Jul 26 13:50:18 2009 +0200

    use itdb_get_itunesdb_path in itdb_parse instead of handcoding it

 src/itdb_itunesdb.c |   20 +++-----------------
 1 files changed, 3 insertions(+), 17 deletions(-)
---
diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c
index 828b871..9dec2d2 100644
--- a/src/itdb_itunesdb.c
+++ b/src/itdb_itunesdb.c
@@ -3001,21 +3001,9 @@ itdb_parse_internal (Itdb_iTunesDB *itdb, GError **error)
 Itdb_iTunesDB *itdb_parse (const gchar *mp, GError **error)
 {
     gchar *filename;
-    gchar *itunes_dir;
     Itdb_iTunesDB *itdb = NULL;
-    const gchar *db[] = {"iTunesDB", NULL};
-
-
-    itunes_dir = itdb_get_itunes_dir (mp);
-
-    if (!itunes_dir)
-    {
-       error_no_itunes_dir (mp, error);
-       return NULL;
-    }
-
-    filename = itdb_resolve_path (itunes_dir, db);
 
+    filename = itdb_get_itunesdb_path (mp);
     if (filename)
     {
        itdb = itdb_new ();
@@ -3061,15 +3049,13 @@ Itdb_iTunesDB *itdb_parse (const gchar *mp, GError 
**error)
     }
     else
     {
-       gchar *str = g_build_filename (mp, itunes_dir, db[0], NULL);
        g_set_error (error,
                     ITDB_FILE_ERROR,
                     ITDB_FILE_ERROR_NOTFOUND,
                     _("File not found: '%s'."),
-                    str);
-       g_free (str);
+                    filename);
     }
-    g_free (itunes_dir);
+    g_free (filename);
     return itdb;
 }
 

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to