fix getVersions() for sub directories
This commit is contained in:
parent
bb3b38947d
commit
92009c5d8e
1 changed files with 3 additions and 2 deletions
|
@ -249,8 +249,9 @@ class Storage {
|
|||
foreach ($files as $file) {
|
||||
if ($file['type'] === 'file') {
|
||||
$pos = strrpos($file['path'], '.v');
|
||||
$length = $pos - strlen('files_versions/');
|
||||
if (substr($file['path'], strlen('files_versions/'), $length) === $versionedFile) {
|
||||
$length = $pos - strlen('files_versions/'.dirname($filename));
|
||||
$currentFile = substr($file['name'], 0, strrpos($file['name'], '.v'));
|
||||
if ($currentFile === $versionedFile) {
|
||||
$version = substr($file['path'], $pos + 2);
|
||||
$key = $version . '#' . $filename;
|
||||
$versions[$key]['cur'] = 0;
|
||||
|
|
Loading…
Reference in a new issue