Skip to content

Commit c61e31d

Browse files
author
Aan Wahyu
committedDec 23, 2015
DirList-JSON-HASH v1.1.4
1 parent 0f1917d commit c61e31d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed
 

‎README.md

+4
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,7 @@ v1.1.2 - 22/12/2015
3131
v1.1.3 - 23/12/2015
3232

3333
- Add Progres file debug support
34+
35+
v1.1.4 24/12/2015
36+
37+
- Remove last directory path from JSON location

‎dirList-JSON-Hash.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ function getDetails($array, $useHash, $realPath, $dirRoot, $urlPrefix)
4848
foreach($array as $file)
4949
{
5050
$finfo = finfo_open(FILEINFO_MIME_TYPE);
51-
$realPathFile = str_replace($realPath, $dirRoot, realPath($file));
51+
$pathFile = str_replace($realPath, $dirRoot, realPath($file));
52+
53+
// remove last directory path from arguments. ex : /home/user/doc/file.txt to file.txt
54+
$realPathFile = str_replace($dirRoot."/", "", $pathFile);
5255

5356
// Exclude dir from list
5457
if( is_dir($file) == false )

0 commit comments

Comments
 (0)
Please sign in to comment.