Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/bareos/bareos-webui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rw-r--r--module/Restore/src/Restore/Model/RestoreModel.php4
2 files changed, 3 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bcfe898..05fc673 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 8af494c..054263e 100644
--- a/module/Restore/src/Restore/Model/RestoreModel.php
+++ b/module/Restore/src/Restore/Model/RestoreModel.php
@@ -64,7 +64,7 @@ class RestoreModel
$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 @@ class RestoreModel
}
}
// 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) {