From 2df2463228430787eb21dcf4f6cae9cf755751b6 Mon Sep 17 00:00:00 2001 From: Kjell Winblad Date: Mon, 28 Nov 2016 05:28:31 -0500 Subject: [PATCH] Fix broken links to files of other filetypes than image --- index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 9af1dea..99d42d1 100755 --- a/index.php +++ b/index.php @@ -353,11 +353,12 @@ function guardAgainstDirectoryTraversal($path) { // audio files if ($extension != "") { + $linkUrl = str_replace('%2F', '/', rawurlencode("$current_dir/$file")); $files[] = array( "name" => $file, "date" => filemtime($current_dir . "/" . $file), "size" => filesize($current_dir . "/" . $file), - "html" => "
  • " . padstring($file, 20) . "$file$filename_caption
  • "); + "html" => "
  • " . padstring($file, 20) . "$file$filename_caption
  • "); } } }