fixes replacing /mvn multiple times in the artifact path. only the first match needs be replaced

This commit is contained in:
steckbrief 2018-11-28 21:15:28 +01:00
parent 3ac6059824
commit 6ca8374504

View file

@ -8,7 +8,7 @@ $config = require(__DIR__.'/config/config.inc.php');
initTheDevStackErrorHandler($config["logfile"]);
$requestedArtifact = $_SERVER["REQUEST_URI"];
$requestedArtifact = str_replace('/mvn', '', $requestedArtifact);
$requestedArtifact = preg_replace('/^\/mvn/', '', $requestedArtifact);
$baseLocalFolder = __DIR__.'/..';
$localFolder = $baseLocalFolder.substr($requestedArtifact, 0, strripos($requestedArtifact, '/'));