aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/View.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Files/View.php')
-rw-r--r--lib/private/Files/View.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php
index f17ced1611b..e49043355e8 100644
--- a/lib/private/Files/View.php
+++ b/lib/private/Files/View.php
@@ -10,6 +10,7 @@ namespace OC\Files;
use Icewind\Streams\CallbackWrapper;
use OC\Files\Mount\MoveableMount;
use OC\Files\Storage\Storage;
+use OC\Files\Storage\Wrapper\Quota;
use OC\Share\Share;
use OC\User\LazyUser;
use OC\User\Manager as UserManager;
@@ -1578,12 +1579,22 @@ class View {
// Create parent folders if the mountpoint is inside a subfolder that doesn't exist yet
if (!isset($files[$entryName])) {
try {
+ [$storage, ] = $this->resolvePath($path . '/' . $entryName);
+ // make sure we can create the mountpoint folder, even if the user has a quota of 0
+ if ($storage->instanceOfStorage(Quota::class)) {
+ $storage->enableQuota(false);
+ }
+
if ($this->mkdir($path . '/' . $entryName) !== false) {
$info = $this->getFileInfo($path . '/' . $entryName);
if ($info !== false) {
$files[$entryName] = $info;
}
}
+
+ if ($storage->instanceOfStorage(Quota::class)) {
+ $storage->enableQuota(true);
+ }
} catch (\Exception $e) {
// Creating the parent folder might not be possible, for example due to a lack of permissions.
$this->logger->debug('Failed to create non-existent parent', ['exception' => $e, 'path' => $path . '/' . $entryName]);