mirror of
https://github.com/taglib/taglib.git
synced 2025-11-16 22:52:57 -05:00
added check for readOnly in save methods
This commit is contained in:
@ -21,6 +21,7 @@
|
||||
|
||||
#include "s3mfile.h"
|
||||
#include "tstringlist.h"
|
||||
#include "tdebug.h"
|
||||
#include "modfileprivate.h"
|
||||
|
||||
using namespace TagLib;
|
||||
@ -71,6 +72,11 @@ S3M::Properties *S3M::File::audioProperties() const
|
||||
|
||||
bool S3M::File::save()
|
||||
{
|
||||
if(readOnly())
|
||||
{
|
||||
debug("S3M::File::save() - Cannot save to a read only file.");
|
||||
return false;
|
||||
}
|
||||
// note: if title starts with "Extended Module: "
|
||||
// the file would look like an .xm file
|
||||
seek(0);
|
||||
|
||||
Reference in New Issue
Block a user