aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/View.php
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2024-02-01 16:13:27 +0100
committerCôme Chilliet <91878298+come-nc@users.noreply.github.com>2024-02-05 11:16:04 +0100
commitb2e9e0fa0d6c50892e94b4ad325ef59fe41dfad9 (patch)
tree64e2799ed769ae19605eb94df57f995a02f3330b /lib/private/Files/View.php
parent961ccee5f6cd08d8e06aea7f2e4e432cdb7d88e0 (diff)
downloadnextcloud-server-b2e9e0fa0d6c50892e94b4ad325ef59fe41dfad9.tar.gz
nextcloud-server-b2e9e0fa0d6c50892e94b4ad325ef59fe41dfad9.zip
chore: Replace OC::$server->getL10N by OCP\Util::getL10N in lib and some apps
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private/Files/View.php')
-rw-r--r--lib/private/Files/View.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php
index df8990790bb..2f8f3c08a80 100644
--- a/lib/private/Files/View.php
+++ b/lib/private/Files/View.php
@@ -1846,19 +1846,19 @@ class View {
[$storage, $internalPath] = $this->resolvePath($path);
$storage->verifyPath($internalPath, $fileName);
} catch (ReservedWordException $ex) {
- $l = \OC::$server->getL10N('lib');
+ $l = \OCP\Util::getL10N('lib');
throw new InvalidPathException($l->t('File name is a reserved word'));
} catch (InvalidCharacterInPathException $ex) {
- $l = \OC::$server->getL10N('lib');
+ $l = \OCP\Util::getL10N('lib');
throw new InvalidPathException($l->t('File name contains at least one invalid character'));
} catch (FileNameTooLongException $ex) {
- $l = \OC::$server->getL10N('lib');
+ $l = \OCP\Util::getL10N('lib');
throw new InvalidPathException($l->t('File name is too long'));
} catch (InvalidDirectoryException $ex) {
- $l = \OC::$server->getL10N('lib');
+ $l = \OCP\Util::getL10N('lib');
throw new InvalidPathException($l->t('Dot files are not allowed'));
} catch (EmptyFileNameException $ex) {
- $l = \OC::$server->getL10N('lib');
+ $l = \OCP\Util::getL10N('lib');
throw new InvalidPathException($l->t('Empty filename is not allowed'));
}
}