From 6ca8374504e4b3c33aa080b8579b3a950f6d8682 Mon Sep 17 00:00:00 2001 From: steckbrief Date: Wed, 28 Nov 2018 21:15:28 +0100 Subject: fixes replacing /mvn multiple times in the artifact path. only the first match needs be replaced --- src/mvncache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mvncache.php') diff --git a/src/mvncache.php b/src/mvncache.php index 7abb765..a3cfa7c 100644 --- a/src/mvncache.php +++ b/src/mvncache.php @@ -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, '/')); -- cgit v1.2.3