]> _ Git - fluidbook-toolbox.git/commitdiff
wait #5980 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 2 Jun 2023 10:24:48 +0000 (12:24 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 2 Jun 2023 10:24:48 +0000 (12:24 +0200)
app/Fluidbook/Packager/Download.php

index d95f8607dc1384bb9c84ca3461c652a526193170..9633db361441f2f9284021050c25874765bccfaf 100644 (file)
@@ -33,7 +33,7 @@ class Download extends DownloadBase
 
     protected $_params = [];
 
-    public function __construct($entry, $version, $action, $user=null, $params = [])
+    public function __construct($entry, $version, $action, $user = null, $params = [])
     {
         parent::__construct($entry, $action, $user);
         $this->_params = $params;
@@ -107,8 +107,8 @@ class Download extends DownloadBase
                 if (!$server) {
                     throw new \Exception('No valid server defined for external installation');
                 }
-                if (!$dest) {
-                    throw new \Exception('No path defined for external server installation');
+                if (!$dest && !$server->allows_root) {
+                    throw new \Exception('No path defined for external server installation : this server does not allow installing on root');
                 }
 
                 $translateVariables['server'] = $server->name;