Skip to content

Restore browser globbing bug with paths in mark command#801

Merged
arogge merged 3 commits intobareos:masterfrom
alaaeddineelamri:dev/alaaeddineelamri/master/restore-browser-globbing-bug
May 27, 2021
Merged

Restore browser globbing bug with paths in mark command#801
arogge merged 3 commits intobareos:masterfrom
alaaeddineelamri:dev/alaaeddineelamri/master/restore-browser-globbing-bug

Conversation

@alaaeddineelamri
Copy link
Contributor

@alaaeddineelamri alaaeddineelamri commented Apr 23, 2021

Thank you for contributing to the Bareos Project!

Description:
In the restore browser, when a user wants to use wildcards within complex paths, files do not get marked consistently or paths are considered invalid. These changes address this issue by changing how the wildcard matching works within the mark command as well as introducing a unit test.

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

If you have any questions or problems, please give a comment in the PR.

Helpful documentation and best practices

Checklist for the reviewer of the PR (will be processed by the Bareos team)

General
  • PR name is meaningful
  • Purpose of the PR is understood
  • Separate commit for this PR in the CHANGELOG.md, PR number referenced is same
  • Commit descriptions are understandable and well formatted
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR
  • check-sources --since-merge does not report any problems
  • git status should not report modifications in the source tree after building and testing
Tests
  • Decision taken that a system- or unittest is required (if not, then remove this paragraph)
  • The decision towards a systemtest is reasonable compared to a unittest
  • Testname matches exactly what is being tested
  • Output of the test leads quickly to the origin of the fault

@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/restore-browser-globbing-bug branch 5 times, most recently from e6ae437 to 4e8e68d Compare April 27, 2021 15:45
@pstorz pstorz marked this pull request as ready for review April 29, 2021 09:11
@pstorz pstorz requested a review from arogge April 29, 2021 09:11
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/restore-browser-globbing-bug branch 4 times, most recently from a0e1a05 to 7e20c29 Compare May 7, 2021 09:05
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/restore-browser-globbing-bug branch 2 times, most recently from 730b60f to 20f2c0a Compare May 14, 2021 10:45
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/restore-browser-globbing-bug branch 2 times, most recently from af395dd to 54c6a40 Compare May 27, 2021 12:34
- Changed the matching algorithm
- Moved the marking and counting of the elements to its own function
- Did some variable renaming and changed certain comments
- Had to recreate and fake the environment in which the `cd` and `mark`
  commands work in order to test them.
- Initial file tree could be expanded
Copy link
Member

@arogge arogge left a comment

Choose a reason for hiding this comment

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

Looks great. Works great.
bareos-check-sources fixed an indentation in a CMakeLists.txt and i rewrapped another commit comment. Other than that I resolved a conflict I just introduced by merging another PR.

However, we should probably add a benchmark for this in the future, as this is one of the few really performance-critical things that happens in the director. People casually load directory tree's with millions of files.

@arogge arogge force-pushed the dev/alaaeddineelamri/master/restore-browser-globbing-bug branch from 54c6a40 to 947d5d5 Compare May 27, 2021 15:29
@arogge arogge merged commit e782ad2 into bareos:master May 27, 2021
@alaaeddineelamri alaaeddineelamri mentioned this pull request May 28, 2021
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants