From 277f25222a3a97d8140a9dbc77f517fe74705b5f Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle <schiessle@owncloud.com> Date: Tue, 10 Jun 2014 12:26:43 +0200 Subject: [PATCH] if file doesn't exist, check parent folder --- apps/files_encryption/lib/proxy.php | 6 ++++++ config/.htaccess | 0 2 files changed, 6 insertions(+) mode change 100644 => 100755 config/.htaccess diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php index 51de8fc7e4..126a593ee3 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 old mode 100644 new mode 100755 -- GitLab