aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files
diff options
context:
space:
mode:
authorSimon L <szaimen@e.mail.de>2023-09-04 12:05:36 +0200
committerGitHub <noreply@github.com>2023-09-04 12:05:36 +0200
commit489a57e9a382ac72ee46d8740506f4e8f607d131 (patch)
tree575b535e7d1c2565eec7752d729957a1bae648b6 /lib/private/Files
parent373f3f6d3edfb080a909c061d7874869d9f7cbb0 (diff)
parent8d1a3daa3fd7d1a4ecb7934662a76266a02ce225 (diff)
downloadnextcloud-server-489a57e9a382ac72ee46d8740506f4e8f607d131.tar.gz
nextcloud-server-489a57e9a382ac72ee46d8740506f4e8f607d131.zip
Merge pull request #39707 from nextcloud/bugfix/39706/local-ext-storage-unavailable-mode
Diffstat (limited to 'lib/private/Files')
-rw-r--r--lib/private/Files/Storage/Local.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php
index 02708ed4f7d..fdc30b49259 100644
--- a/lib/private/Files/Storage/Local.php
+++ b/lib/private/Files/Storage/Local.php
@@ -51,6 +51,7 @@ use OCP\Files\ForbiddenException;
use OCP\Files\GenericFileException;
use OCP\Files\IMimeTypeDetector;
use OCP\Files\Storage\IStorage;
+use OCP\Files\StorageNotAvailableException;
use OCP\IConfig;
use OCP\Util;
use Psr\Log\LoggerInterface;
@@ -95,6 +96,12 @@ class Local extends \OC\Files\Storage\Common {
// support Write-Once-Read-Many file systems
$this->unlinkOnTruncate = $this->config->getSystemValueBool('localstorage.unlink_on_truncate', false);
+
+ if (isset($arguments['isExternal']) && $arguments['isExternal'] && !$this->stat('')) {
+ // data dir not accessible or available, can happen when using an external storage of type Local
+ // on an unmounted system mount point
+ throw new StorageNotAvailableException('Local storage path does not exist "' . $this->getSourcePath('') . '"');
+ }
}
public function __destruct() {