From 95115ffcc9fa13c966e7c7f0ffc7b6da182e6b51 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Thu, 10 Jul 2008 16:28:00 +0000 Subject: Don't try to write ArtworkDB/PhotoDB when we fail to write ithmb files git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@2047 f01d2545-417e-4e96-918e-98f8d0dbbcb6 --- ChangeLog | 5 +++++ src/db-artwork-writer.c | 12 ++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 47f010e..41ce013 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-07-10 Christophe Fergeau + + * src/db-artwork-writer.c: if we fail to write ithmb files for some + reason, don't go on trying to write the ArtworkDB/PhotoDB as well + 2008-07-09 Todd Zullinger * po/POTFILES.in: add src/itdb_thumb.c diff --git a/src/db-artwork-writer.c b/src/db-artwork-writer.c index 00d62a6..c27f3e9 100644 --- a/src/db-artwork-writer.c +++ b/src/db-artwork-writer.c @@ -1151,6 +1151,7 @@ ipod_write_artwork_db (Itdb_iTunesDB *itdb) char *filename; int id_max; Itdb_DB db; + int status; db.db_type = DB_TYPE_ITUNES; db.db.itdb = itdb; @@ -1160,7 +1161,10 @@ ipod_write_artwork_db (Itdb_iTunesDB *itdb) /* First, let's write the .ithmb files, this will create the * various thumbnails as well */ - itdb_write_ithumb_files (&db); + status = itdb_write_ithumb_files (&db); + if (status != 0) { + return -1; + } filename = ipod_db_get_artwork_db_path (itdb_get_mountpoint (itdb)); if (filename == NULL) { @@ -1200,13 +1204,17 @@ ipod_write_photo_db (Itdb_PhotoDB *photodb) char *filename; int id_max; Itdb_DB db; + int status; db.db_type = DB_TYPE_PHOTO; db.db.photodb = photodb; filename = ipod_db_get_photos_db_path (db_get_mountpoint (&db)); - itdb_write_ithumb_files (&db); + status = itdb_write_ithumb_files (&db); + if (status != 0) { + return -1; + } if (filename == NULL) { return -1; -- cgit