mirror of
https://github.com/taglib/taglib.git
synced 2025-07-22 15:04:24 -04:00
added check for readOnly in save methods
This commit is contained in:
@ -21,6 +21,7 @@
|
||||
|
||||
#include "tstringlist.h"
|
||||
#include "itfile.h"
|
||||
#include "tdebug.h"
|
||||
#include "modfileprivate.h"
|
||||
|
||||
using namespace TagLib;
|
||||
@ -76,6 +77,11 @@ IT::Properties *IT::File::audioProperties() const
|
||||
|
||||
bool IT::File::save()
|
||||
{
|
||||
if(readOnly())
|
||||
{
|
||||
debug("IT::File::save() - Cannot save to a read only file.");
|
||||
return false;
|
||||
}
|
||||
seek(4);
|
||||
writeString(d->tag.title(), 26);
|
||||
// TODO: write comment as instrument and sample names
|
||||
|
Reference in New Issue
Block a user