Skip to content

Commit

Permalink
Merge pull request #3438 from nextcloud/external-storage-user-folder
Browse files Browse the repository at this point in the history
Allow using '/' as external storage mountpoint
  • Loading branch information
rullzer authored Mar 31, 2017
2 parents 85da937 + 76d8699 commit 57020a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/files_external/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ MountConfigListView.prototype = _.extend({
success: function(result) {
var onCompletion = jQuery.Deferred();
$.each(result, function(i, storageParams) {
storageParams.mountPoint = storageParams.mountPoint.substr(1); // trim leading slash
storageParams.mountPoint = (storageParams.mountPoint === '/')? '/' : storageParams.mountPoint.substr(1); // trim leading slash
var storageConfig = new self._storageConfigClass();
_.extend(storageConfig, storageParams);
var $tr = self.newStorage(storageConfig, onCompletion);
Expand Down
2 changes: 1 addition & 1 deletion apps/files_external/lib/Controller/StoragesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ protected function createStorage(
*/
protected function validate(StorageConfig $storage) {
$mountPoint = $storage->getMountPoint();
if ($mountPoint === '' || $mountPoint === '/') {
if ($mountPoint === '') {
return new DataResponse(
array(
'message' => (string)$this->l10n->t('Invalid mount point')
Expand Down

1 comment on commit 57020a0

@enoch85
Copy link
Member

Choose a reason for hiding this comment

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

Will this solve #3789 and #1970?

Please sign in to comment.