Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue: external storage naming #11755 #12049

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/files_external/l10n/en_GB.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ OC.L10N.register(
"Storage with ID \"%d\" not found" : "Storage with ID \"%d\" not found",
"Invalid backend or authentication mechanism class" : "Invalid backend or authentication mechanism class",
"Invalid mount point" : "Invalid mount point",
"Invalid path of mountpoint" : "Invalid path of mountpoint",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for this.

"Objectstore forbidden" : "Objectstore forbidden",
"Invalid storage backend \"%s\"" : "Invalid storage backend \"%s\"",
"Not permitted to use backend \"%s\"" : "Not permitted to use backend \"%s\"",
Expand Down
1 change: 1 addition & 0 deletions apps/files_external/l10n/en_GB.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"Storage with ID \"%d\" not found" : "Storage with ID \"%d\" not found",
"Invalid backend or authentication mechanism class" : "Invalid backend or authentication mechanism class",
"Invalid mount point" : "Invalid mount point",
"Invalid path of mountpoint" : "Invalid path of mountpoint",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not required. Our translation scrips sync this auytmaitcally to transifex for translations

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I remove it from PR?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - the automatic script will update it and the translations are stored on transifex anyways.

"Objectstore forbidden" : "Objectstore forbidden",
"Invalid storage backend \"%s\"" : "Invalid storage backend \"%s\"",
"Not permitted to use backend \"%s\"" : "Not permitted to use backend \"%s\"",
Expand Down
10 changes: 10 additions & 0 deletions apps/files_external/lib/Controller/StoragesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,16 @@ protected function validate(StorageConfig $storage) {
);
}

$mountPointParentDir = dirname($mountPoint, 1);
if ($mountPointParentDir && !\OC\Files\Filesystem::is_dir($mountPointParentDir)) {
return new DataResponse(
array(
'message' => (string)$this->l10n->t('Invalid path of mountpoint')
),
Http::STATUS_UNPROCESSABLE_ENTITY
);
}

if ($storage->getBackendOption('objectstore')) {
// objectstore must not be sent from client side
return new DataResponse(
Expand Down