From 962f80ea839c0889a32a5b80d73843eed8e16344 Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Thu, 22 Jan 2009 12:41:45 +0100 Subject: [PATCH] check if tags are properly saved --- src/tag_editor.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tag_editor.cpp b/src/tag_editor.cpp index 3d8d394f..b36fae92 100644 --- a/src/tag_editor.cpp +++ b/src/tag_editor.cpp @@ -397,7 +397,8 @@ bool WriteTags(Song &s) f.tag()->setTrack(StrToInt(s.GetTrack())); f.tag()->setGenre(ToWString(s.GetGenre())); f.tag()->setComment(ToWString(s.GetComment())); - f.save(); + if (!f.save()) + return false; string ext = s.GetFile(); ext = ext.substr(ext.find_last_of(".")+1); @@ -422,7 +423,8 @@ bool WriteTags(Song &s) tag->addFrame(PerformerFrame); tag->removeFrames(Disc); tag->addFrame(DiscFrame); - file.save(); + if (!file.save()) + return false; } if (!s.GetNewName().empty()) {