Update of /cvsroot/gtkpod/libgpod/tests
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3573/tests

Modified Files:
        test-rebuild-db.cc 
Log Message:
* tests/test-rebuild-db.cc: forgot to propagate a GError


Index: test-rebuild-db.cc
===================================================================
RCS file: /cvsroot/gtkpod/libgpod/tests/test-rebuild-db.cc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- test-rebuild-db.cc  10 Apr 2006 18:38:10 -0000      1.1
+++ test-rebuild-db.cc  12 Apr 2006 18:51:51 -0000      1.2
@@ -2,20 +2,20 @@
  * Copyright (C) 2006 Christophe Fergeau
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to 
- * deal in the Software without restriction, including without limitation the 
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is 
+ * sell copies of the Software, and to permit persons to whom the Software is
  * furnished to do so, subject to the following conditions:
  *
- * The above copyright notice and this permission notice shall be included in 
+ * The above copyright notice and this permission notice shall be included in
  * all copies or substantial portions of the Software.
  *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  * IN THE SOFTWARE.
  */
@@ -89,7 +89,7 @@
        g_print ("\t%d\n", tag->year());
        g_print ("\t%d\n", tag->track());
        g_print ("\n");
-#endif 
+#endif
        track = itdb_track_new ();
        track->title = g_strdup (tag->title().toCString(true));
        track->album = g_strdup (tag->album().toCString(true));
@@ -130,9 +130,9 @@
 typedef void (*DirTraversalFunc)(const char *filename, gpointer data);
 
 static void
-foreach_file (const char *basedir, 
-             DirTraversalFunc func, gpointer data, 
-             GError **error) 
+foreach_file (const char *basedir,
+             DirTraversalFunc func, gpointer data,
+             GError **error)
 {
        GError *tmp_error;
        const char *name;
@@ -146,7 +146,7 @@
                g_propagate_error (error, tmp_error);
                return;
        }
-       
+
        name = g_dir_read_name (dir);
        while (name != NULL) {
                char *absolute_path;
@@ -183,7 +183,11 @@
        music_dir = itdb_get_music_dir (itdb_get_mountpoint (db));
        foreach_file (music_dir, process_one_file, db, &err);
        g_free (music_dir);
-       g_print ("Found %d files\n", 
+       if (err != NULL) {
+               g_propagate_error (error, err);
+               return;
+       }
+       g_print ("Found %d files\n",
                 g_list_length (itdb_playlist_mpl(db)->members));
 }
 
@@ -209,7 +213,7 @@
 {
        Itdb_iTunesDB *db;
        GError *error;
-       
+
        if (argc != 2) {
                g_print ("Usage:\n");
                g_print ("%s <mountpoint>\n", g_basename (argv[0]));



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to