When accessing course elements of type folder via WebDAV they show up in a folder _courselementdata with the ID of the course. The actual hierarchy in the course tree is not represented. This makes it very user unfriendly as users have to lookup and remember course element ID's in case they have to folder with the same name in different locations of the course.
E.g: five chapters, each have a folder "documents". This will generate five folder "documents" with their ID. A much better way would be to maintain the directory structure in WebDAV.
In case there are two elements in the tree with the same name, the old rule with the ID must remain to make the names unique. In practice this is rarely the case.
See patch for an example, needs testing and finalization.
BZW: Check also for folder names with "&" in it. I had troubles with OSX with such names.