some information on if the save was successful.
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@323170
283d02a7-25f6-0310-bc7c-
ecb5cbfe19da
}
-void FLAC::File::save()
+bool FLAC::File::save()
{
+ if(readOnly()) {
+ debug("FLAC::File::save() - Cannot save to a read only file.");
+ return false;
+ }
+
// Create new vorbis comments
if(!d->comment) {
writeBlock(d->ID3v1Tag->render());
}
+ return true;
}
ID3v2::Tag *FLAC::File::ID3v2Tag(bool create)
* Save the file. This will primarily save the XiphComment, but
* will also keep any old ID3-tags up to date. If the file
* has no XiphComment, one will be constructed from the ID3-tags.
+ *
+ * This returns true if the save was successful.
*/
- virtual void save();
+ virtual bool save();
/*!
* Returns a pointer to the ID3v2 tag of the file.
}
-void Ogg::FLAC::File::save()
+bool Ogg::FLAC::File::save()
{
d->xiphCommentData = d->comment->render();
setPacket(d->commentPacket, v);
- Ogg::File::save();
+ return Ogg::File::save();
}
////////////////////////////////////////////////////////////////////////////////
/*!
* Save the file. This will primarily save and update the XiphComment.
+ * Returns true if the save is successful.
*/
- virtual void save();
+ virtual bool save();
/*!
* Returns the length of the audio-stream, used by FLAC::Properties for