How to reproduce on 5.2.4 / HEAD:
- open a course that has a folder course element
- open the course editor
- open the course storage folder
- in the course storage folder, navigate to the course element folder (_courseelementdata/Your Folder (nodeid)/)
- Try to create a new file
- Try to edit an existing file
The problem is in the VFSManager.findWritableRootFolderForRecursion(VFSContainer rootDir, String relFilePath, int recursionLevel) method.
Since the _courselementmetadata is a MergeSource container, it returns the getRootWriteContainer(). But it should actually find the next writable folder in the path of the file instead. It should search the tree upwards, not downwards. I think the correct rule would be to first search upwards and only if no writable root can be found it should search downwards.