If CreateObject is called with an id that describes an item instead of
a container ContentDirectory:2 spec says that the error should be 701
(No such object) instead of 713 (Restricted parent)
(this.container_id, this.cancellable);
}
- if (media_object == null) {
+ if (media_object == null || !(media_object is MediaContainer)) {
throw new ContentDirectoryError.NO_SUCH_OBJECT
(_("No such object"));
- } else if (!(media_object is MediaContainer) ||
- !(OCMFlags.UPLOAD in media_object.ocm_flags)) {
+ } else if (!(OCMFlags.UPLOAD in media_object.ocm_flags)) {
throw new ContentDirectoryError.RESTRICTED_PARENT
(_("Object creation in %s not allowed"),
media_object.id);