ret = __check_metadata_parameter(metadata);
metadata_editor_retvm_if(ret != METADATA_EDITOR_ERROR_NONE, ret, "fail to __check_metadata_parameter");
- metadata_editor_retvm_if(metadata->isReadOnly, METADATA_EDITOR_ERROR_PERMISSION_DENIED, "File is readonly. Unable to modify");
+ metadata_editor_retvm_if(metadata->file->readOnly(), METADATA_EDITOR_ERROR_PERMISSION_DENIED, "File is readonly. Unable to modify");
return METADATA_EDITOR_ERROR_NONE;
}
_metadata->file = NULL;
_metadata->filetype = METADATA_EDITOR_FORMAT_NOTYPE; // Specify file type out of range
- _metadata->isReadOnly = true; // Handle unexisting file as readonly
// Save the structure in the metadata
*metadata = (metadata_editor_h)_metadata;
_metadata->file = NULL;
_metadata->filetype = METADATA_EDITOR_FORMAT_NOTYPE;
- _metadata->isReadOnly = true;
}
try {
_metadata->file = _file;
_metadata->filetype = media_type;
- _metadata->isReadOnly = _file->readOnly();
return METADATA_EDITOR_ERROR_NONE;
}