{"action":"opened","issue":{"url":"https://api.github.com/repos/owncloud/core/issues/16586","labels_url":"https://api.github.com/repos/owncloud/core/issues/16586/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/core/issues/16586/comments","events_url":"https://api.github.com/repos/owncloud/core/issues/16586/events","html_url":"https://github.com/owncloud/core/issues/16586","id":81453696,"number":16586,"title":"No file_locking if encryption is enabled","user":{"login":"schiesbn","id":1589737,"avatar_url":"https://avatars.githubusercontent.com/u/1589737?v=3","gravatar_id":"","url":"https://api.github.com/users/schiesbn","html_url":"https://github.com/schiesbn","followers_url":"https://api.github.com/users/schiesbn/followers","following_url":"https://api.github.com/users/schiesbn/following{/other_user}","gists_url":"https://api.github.com/users/schiesbn/gists{/gist_id}","starred_url":"https://api.github.com/users/schiesbn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schiesbn/subscriptions","organizations_url":"https://api.github.com/users/schiesbn/orgs","repos_url":"https://api.github.com/users/schiesbn/repos","events_url":"https://api.github.com/users/schiesbn/events{/privacy}","received_events_url":"https://api.github.com/users/schiesbn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-27T13:45:28Z","updated_at":"2015-05-27T13:45:28Z","closed_at":null,"body":"I just discovered that we disable file_locking completely if encryption is enabled.\r\n\r\nThis happens because the encryption stream wrapper returns always 'false' on isLocal() if encryption is enabled. This behavior was discussed and implemented here by @DeepDiver1975 @icewind1991 @VicDeo and @PVince81 https://github.com/owncloud/core/issues/15848\r\n\r\nI can understand the reasons for that, but probably we need to adjust the way we apply the files_locking wrapper in this case. Maybe by changing https://github.com/owncloud/files_locking/blob/master/lib/lockingwrapper.php#L203 to something like:\r\n\r\n````\r\nif ($storage->instanceOfStorage('OC\\Files\\Storage\\Local') && !$storage->instanceOfStorage('\\OC\\Files\\Storage\\MappedLocal'))\r\n````\r\n\r\nOpinions?"}}