summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Fergeau <teuf@gnome.org>2008-07-10 16:28:00 +0000
committerChristophe Fergeau <teuf@gnome.org>2008-07-10 16:28:00 +0000
commit95115ffcc9fa13c966e7c7f0ffc7b6da182e6b51 (patch)
treeecbd9001822f4329f5fcfd25f3032296fb28f183
parent90bf75806e2322efdf1d58d19f7c7cccdddbab99 (diff)
downloadlibgpod-95115ffcc9fa13c966e7c7f0ffc7b6da182e6b51.tar.gz
libgpod-95115ffcc9fa13c966e7c7f0ffc7b6da182e6b51.tar.xz
libgpod-95115ffcc9fa13c966e7c7f0ffc7b6da182e6b51.zip
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
-rw-r--r--ChangeLog5
-rw-r--r--src/db-artwork-writer.c12
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 <teuf@gnome.org>
+
+ * 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 <tmzullinger at users.sourceforge.net>
* 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;