summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-06-10 12:26:43 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2014-06-14 10:14:07 +0200
commit277f25222a3a97d8140a9dbc77f517fe74705b5f (patch)
tree11f72623189a7016ee0261e510ed93cd675f4f2e
parent2005c162bdfbe70f2690697eee82bcbd28ff57f5 (diff)
downloadnextcloud-server-277f25222a3a97d8140a9dbc77f517fe74705b5f.tar.gz
nextcloud-server-277f25222a3a97d8140a9dbc77f517fe74705b5f.zip
if file doesn't exist, check parent folder
-rw-r--r--apps/files_encryption/lib/proxy.php6
-rwxr-xr-x[-rw-r--r--]config/.htaccess0
2 files changed, 6 insertions, 0 deletions
diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php
index 51de8fc7e41..126a593ee3c 100644
--- a/apps/files_encryption/lib/proxy.php
+++ b/apps/files_encryption/lib/proxy.php
@@ -51,11 +51,17 @@ class Proxy extends \OC_FileProxy {
*/
private function isExcludedPath($path, $uid) {
+ $view = new \OC\Files\View();
+
// files outside of the files-folder are excluded
if(strpos($path, '/' . $uid . '/files') !== 0) {
return true;
}
+ if (!$view->file_exists($path)) {
+ $path = dirname($path);
+ }
+
// we don't encrypt server-to-server shares
list($storage, ) = \OC\Files\Filesystem::resolvePath($path);
if ($storage instanceof OCA\Files_Sharing\External\Storage) {
diff --git a/config/.htaccess b/config/.htaccess
index 2421e9a1631..2421e9a1631 100644..100755
--- a/config/.htaccess
+++ b/config/.htaccess