Skip to content

Commit

Permalink
Fix #370: Filebrowser can mark closed folder as opened
Browse files Browse the repository at this point in the history
When doing string comparison of folder names, we have to make sure the
folders are terminated with a slash.
  • Loading branch information
cmb69 committed Oct 28, 2018
1 parent d5b8560 commit 6b4ad05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/filebrowser/classes/View.php
Expand Up @@ -176,7 +176,7 @@ public function folderLink($folder, array $folders)
global $sn;

$class = 'folder';
if (substr($this->currentDirectory, 0, strlen($folder)) == $folder) {
if (substr($this->currentDirectory, 0, strlen("$folder/")) == "$folder/") {
$class = 'openFolder';
}
$temp = explode('/', $folder);
Expand Down

1 comment on commit 6b4ad05

@frase-git
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works!

Please sign in to comment.