Return webroot relative paths
authorTom Hughes <tom@compton.nu>
Wed, 20 Feb 2019 22:45:58 +0000 (22:45 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 20 Feb 2019 22:45:58 +0000 (22:45 +0000)
cookbooks/planet/templates/default/apache-latest-planet-filename.erb

index 87fd926..9107436 100644 (file)
@@ -15,9 +15,9 @@ while (my $path = <STDIN>)
 
     my $file = abs_path("/store/planet${path}");
 
-    if ($file && $file =~ m|^/store/planet/| && -f $file)
+    if ($file && $file =~ m|^/store/planet(/.*)$| && -f $file)
     {
-        print "${file}\n";
+        print "$1\n";
     }
     else
     {