From: Lukáš Lalinský Date: Sat, 3 Jul 2010 11:36:08 +0000 (+0000) Subject: Don't try to save read-only MP4 files X-Git-Tag: v1.7rc1~43 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ab7e997bc614851ccd01bc3968cd00efb998d928;p=taglib Don't try to save read-only MP4 files git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1145556 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- diff --git a/taglib/mp4/mp4file.cpp b/taglib/mp4/mp4file.cpp index 21a5429b..1e4bd4db 100644 --- a/taglib/mp4/mp4file.cpp +++ b/taglib/mp4/mp4file.cpp @@ -129,6 +129,11 @@ MP4::File::read(bool readProperties, Properties::ReadStyle audioPropertiesStyle) bool MP4::File::save() { + if(readOnly()) { + debug("MP4::File::save() -- File is read only."); + return false; + } + if(!isValid()) return false;