diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js index 976c0c00b891d..4e35ea531eb6f 100644 --- a/apps/files_external/js/settings.js +++ b/apps/files_external/js/settings.js @@ -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); diff --git a/apps/files_external/lib/Controller/StoragesController.php b/apps/files_external/lib/Controller/StoragesController.php index ef7cc8c6e4f04..d962848bd7888 100644 --- a/apps/files_external/lib/Controller/StoragesController.php +++ b/apps/files_external/lib/Controller/StoragesController.php @@ -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')