owncloud/core — pull request #335 by schiesbn (2012-11-09 10:32:46+00:00)
Title: Sharing folder sync stable45

This fixes the problem we had while syncing the Shared folder (issue #260) for stable45. For master we will wait until the new file cache is in place.

- The main problem was that the etags where stored for each virtual "Shared-folder-path" but not for the real physical path. To detect changes from every user with access to the file I now store only the real path in the properties table.

- Since I need to get the origin file source of a shared folder/file I created a new class OC_Files_Sharing_Util which provides public access to the necessary code originally implemented in OC_Filestorage_Shared. For now I just copied the necessary functions over to the new class to avoid unwanted side effects.

- Since it is quite hard and expensive to find all users which have access to a particular file I decided to always modify the etag for the Shared folder. This means that for every check the sync client will look in the root sync dir and the root of the shared folder for changes.

@dragotin and @danimo please also have a look at it and test it with the desktop client.