owncloud-archive / files_locking

3 stars 5 forks source link

make sure that we always wrap the local storage #35

Closed schiessle closed 9 years ago

schiessle commented 9 years ago

Check if storage is a instance of OC\Files\Storage\Local. $storage->isLocal() doesn't work if encryption is enabled because encryption will always return false. (see discussion here: https://github.com/owncloud/core/issues/15848)

fix https://github.com/owncloud/core/issues/16586

cc @PVince81 @icewind1991 @DeepDiver1975

PVince81 commented 9 years ago

Makes sense :+1:

karlitschek commented 9 years ago

:+1:

DeepDiver1975 commented 9 years ago

This change gives me a strange feeling - we did use isLocal() for a reason here ....

PVince81 commented 9 years ago

isLocal() has been misunderstood by many people, so it is likely that whoever wrote this misunderstood too. My time machine is having trouble going back that far since we moved the app several times between repos. It is very likely that this was written by the original author.

One thing I do not underrstand is why we would have decided to disable files_locking for non-local storages. Maybe we thought it's pointless to use local locking for SMB or others ?

Still, I think the change from this PR will make it work as it was intended originally (for whatever reason this was intended)

DeepDiver1975 commented 9 years ago

:+1: as in :see_no_evil:

PVince81 commented 9 years ago

Thanks :see_no_evil: