{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/core/issues/16534","labels_url":"https://api.github.com/repos/owncloud/core/issues/16534/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/core/issues/16534/comments","events_url":"https://api.github.com/repos/owncloud/core/issues/16534/events","html_url":"https://github.com/owncloud/core/pull/16534","id":79443413,"number":16534,"title":"exclude directories from beeing processed","user":{"login":"mmattel","id":3321281,"avatar_url":"https://avatars.githubusercontent.com/u/3321281?v=3","gravatar_id":"","url":"https://api.github.com/users/mmattel","html_url":"https://github.com/mmattel","followers_url":"https://api.github.com/users/mmattel/followers","following_url":"https://api.github.com/users/mmattel/following{/other_user}","gists_url":"https://api.github.com/users/mmattel/gists{/gist_id}","starred_url":"https://api.github.com/users/mmattel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmattel/subscriptions","organizations_url":"https://api.github.com/users/mmattel/orgs","repos_url":"https://api.github.com/users/mmattel/repos","events_url":"https://api.github.com/users/mmattel/events{/privacy}","received_events_url":"https://api.github.com/users/mmattel/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/owncloud/core/labels/enhancement","name":"enhancement","color":"02e10c"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/owncloud/core/milestones/37","html_url":"https://github.com/owncloud/core/milestones/8.2-next","labels_url":"https://api.github.com/repos/owncloud/core/milestones/37/labels","id":993629,"number":37,"title":"8.2-next","description":"","creator":{"login":"craigpg","id":160667,"avatar_url":"https://avatars.githubusercontent.com/u/160667?v=3","gravatar_id":"","url":"https://api.github.com/users/craigpg","html_url":"https://github.com/craigpg","followers_url":"https://api.github.com/users/craigpg/followers","following_url":"https://api.github.com/users/craigpg/following{/other_user}","gists_url":"https://api.github.com/users/craigpg/gists{/gist_id}","starred_url":"https://api.github.com/users/craigpg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigpg/subscriptions","organizations_url":"https://api.github.com/users/craigpg/orgs","repos_url":"https://api.github.com/users/craigpg/repos","events_url":"https://api.github.com/users/craigpg/events{/privacy}","received_events_url":"https://api.github.com/users/craigpg/received_events","type":"User","site_admin":false},"open_issues":493,"closed_issues":0,"state":"open","created_at":"2015-02-24T16:19:37Z","updated_at":"2015-05-30T10:08:45Z","due_on":null,"closed_at":null},"comments":23,"created_at":"2015-05-22T12:49:30Z","updated_at":"2015-05-30T11:22:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/owncloud/core/pulls/16534","html_url":"https://github.com/owncloud/core/pull/16534","diff_url":"https://github.com/owncloud/core/pull/16534.diff","patch_url":"https://github.com/owncloud/core/pull/16534.patch"},"body":"Summary:\r\n\r\n1. Enterprise Storage Systems are capable of Snapshots. These Snapshots are directories with a particular name and keep point in time views of the data. Usually, these snapshot directories are present in each directory\r\n2. There is no common naming for these directories and will never be. NetApp uses ``.snapshot`` and ``~snapshot``, EMC eg ``.ckpt``, HDS eg ``.latest`` and ``~latest`` and so on\r\n3. Viewing and scanning of these directories does not make any sense as these directories are used to restore files from an OS point of view\r\n4. You can also have hardlinks to backups with the same background as described in #15385\r\n5. Scanning a huge datastore containing snapshots does mean that for each snapshot taken ALL files of the datastore are imported into the database again. Example: a datastore containing 200K files, having 15 snapshots means scanning of 3M files where 2.8M are worthless to be imported\r\n\r\nThere are for sure more resons, but I tried to keep it short.\r\n\r\nWith this PR, you can define a array of directory names in config.php which are further excluded from beeing processed.\r\n\r\nThese excluded directory names are not scanned, not viewed, can not be created or renamed (or deleted) or accessed via direct path input from a file explorer.\r\n\r\nAccess methods covered: webdav, webgui and client.\r\n\r\nFollowing test have been made creating either a file or directory having once a allowed and once a excluded name. The results were the same independent of the storage type (tested on user home and SMB).\r\n\r\nThe functions shown in the table are except one all triggered and covered by the access methods used in lib/private/files/view.php\r\n\r\nFor WebDav, CyberDuck and native WebDav access was used on a W7 client.\r\nThe IOS client ran the latest available version (3.4.1)\r\n\r\nAll access tests made passed well.\r\n\r\nThe table shows the covered methods for all storage types using it:\r\n\r\n\t\t| webdav\t| webgui\t| client IOS\r\n------------ |------------ |------------ | -------------\r\ndirectory create | mkdir\t| mkdir\t\t| mkdir\r\ndirectory rename | rename\t| rename\t| rename\r\ndirectory delete | rmdir\t| rmdir\t\t| rmdir\r\n\t\t | \t\t| \t\t| \r\nfile create\t | put(*)\t| touch\t\t| n.a.\r\nfile rename\t | rename\t| rename\t| rename\r\nfile delete | unlink\t| unlink\t| unlink\r\n\r\nn.a. ... function not available\r\n(*) put ... this function is not handled in lib/private/files/view.php but in lib/private/connector/sabre/directory.php which points to ../sabre/file.php\r\n\r\nThe case manually defining the path in a file explorer to access a excluded directory via a webdav connected client is also covered. (lib/private/connector/sabre/objecttree.php and ../sabre/custompropertiesbackend.php)\r\n\r\nAdding a new external storage and let it scan also worked well, excluded directories are not further processed.\r\n\r\n@DeepDiver1975 @karlitschek @nickvergessen @Aesculapius  @icewind1991 @LukasReschke \r\n\r\n(sorry to create another PR, but a rebase messed everything up badly...)"},"comment":{"url":"https://api.github.com/repos/owncloud/core/issues/comments/107025125","html_url":"https://github.com/owncloud/core/pull/16534#issuecomment-107025125","issue_url":"https://api.github.com/repos/owncloud/core/issues/16534","id":107025125,"user":{"login":"mmattel","id":3321281,"avatar_url":"https://avatars.githubusercontent.com/u/3321281?v=3","gravatar_id":"","url":"https://api.github.com/users/mmattel","html_url":"https://github.com/mmattel","followers_url":"https://api.github.com/users/mmattel/followers","following_url":"https://api.github.com/users/mmattel/following{/other_user}","gists_url":"https://api.github.com/users/mmattel/gists{/gist_id}","starred_url":"https://api.github.com/users/mmattel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmattel/subscriptions","organizations_url":"https://api.github.com/users/mmattel/orgs","repos_url":"https://api.github.com/users/mmattel/repos","events_url":"https://api.github.com/users/mmattel/events{/privacy}","received_events_url":"https://api.github.com/users/mmattel/received_events","type":"User","site_admin":false},"created_at":"2015-05-30T11:22:38Z","updated_at":"2015-05-30T11:22:38Z","body":"just rebased (and it worked, I think I got it now hwo to do it... :smile: )"}}