From c696d68d92497d977370ea387ecac6c42253e7e5 Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Thu, 22 Jan 2009 13:29:59 +0100 Subject: [PATCH] check if tags are properly saved (part 2) --- src/ncmpcpp.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ncmpcpp.cpp b/src/ncmpcpp.cpp index f55e3c80..c60f079b 100644 --- a/src/ncmpcpp.cpp +++ b/src/ncmpcpp.cpp @@ -2645,12 +2645,17 @@ int main(int argc, char *argv[]) TagLib::FileRef f(path.c_str()); if (f.isNull()) { - ShowMessage("Error updating tags in '%s'!", (*mLibSongs)[i].GetFile().c_str()); + ShowMessage("Error opening file '%s'!", (*mLibSongs)[i].GetFile().c_str()); success = 0; break; } f.tag()->setAlbum(ToWString(new_album)); - f.save(); + if (!f.save()) + { + ShowMessage("Error writing tags in '%s'!", (*mLibSongs)[i].GetFile().c_str()); + success = 0; + break; + } } if (success) {