owncloud/core — pull request #11835 by PVince81 (2014-10-29 11:25:42+00:00)
Title: Fix moving share keys as non-owner to subdir

This fix gathers the share keys BEFORE a file is moved to make sure that
findShareKeys() is able to find all relevant keys when the file still
exists.

After the move/copy operation the keys are moved/copied to the target
dir.

Also: refactored preRename and preCopy into a single function to avoid
duplicate code.

Fixes https://github.com/owncloud/core/issues/11819

TODO:
- [ ] add unit tests

Tested: (both as owner and receiver)
- [x] web UI move file from shared dir to shared subdir
- [x] webdav move file from shared dir to shared subdir
- [x] webdav copy file from shared dir to shared subdir
- [x] webdav move file from reshared subdir to shared subdir (copy to parent which is not reshared)
- [x] webdav copy file from reshared subdir to shared subdir (copy to parent which is not reshared)

In all cases the file could be read properly after this fix.