mirror of
https://github.com/taglib/taglib.git
synced 2025-07-22 06:54:22 -04:00
added check for readOnly in save methods
This commit is contained in:
@ -20,6 +20,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "tstringlist.h"
|
||||
#include "tdebug.h"
|
||||
#include "xmfile.h"
|
||||
#include "modfileprivate.h"
|
||||
|
||||
@ -73,6 +74,11 @@ XM::Properties *XM::File::audioProperties() const
|
||||
|
||||
bool XM::File::save()
|
||||
{
|
||||
if(readOnly())
|
||||
{
|
||||
debug("XM::File::save() - Cannot save to a read only file.");
|
||||
return false;
|
||||
}
|
||||
seek(17);
|
||||
writeString(d->tag.title(), 20);
|
||||
seek(1, Current);
|
||||
|
Reference in New Issue
Block a user