diff --git a/CHANGELOG.md b/CHANGELOG.md index bcfe8987..05fc673f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Added ### Changed +- Fix to bugreport #887 ### Removed diff --git a/module/Restore/src/Restore/Model/RestoreModel.php b/module/Restore/src/Restore/Model/RestoreModel.php index 8af494cb..054263e9 100644 --- a/module/Restore/src/Restore/Model/RestoreModel.php +++ b/module/Restore/src/Restore/Model/RestoreModel.php @@ -64,7 +64,7 @@ public function getDirectories(&$bsock=null, $jobid=null, $pathid=null) { $cmd_2 = '.bvfs_lsdirs jobid='.$jobid.' path=@ limit='.$limit; $result = $bsock->send_command($cmd_2, 2, $jobid); $directories = \Zend\Json\Json::decode($result, \Zend\Json\Json::TYPE_ARRAY); - if(count($directories['result']['directories']) == 2) { + if(count($directories['result']['directories']) <= 2) { $retval = array_merge($retval, $directories['result']['directories']); // as . and .. are always returned, filter possible duplicates of . and .. (current and parent dir) foreach($retval as $key => $value) { @@ -78,7 +78,7 @@ public function getDirectories(&$bsock=null, $jobid=null, $pathid=null) { } } // no more results? - elseif (count($directories['result']['directories']) == 2) { + elseif (count($directories['result']['directories']) <= 2) { $retval = array_merge($retval, $directories['result']['directories']); // as . and .. are always returned, filter possible duplicates of . and .. (current and parent dir) foreach($retval as $key => $value) {