Branch: refs/heads/master
Home: https://github.com/openSUSE/open-build-service
Commit: b78ee61cd7048fc93538532cc62c39122b1d91f8
https://github.com/openSUSE/open-build-service/commit/b78ee61cd7048fc9353853...
Author: Eduardo Navarro
Date: 2023-10-10 (Tue, 10 Oct 2023)
Changed paths:
M src/api/app/controllers/build/file_controller.rb
Log Message:
-----------
Remove unreachable code in build/file controller
When there is a query string in the url, `request.query_string` returns
the query string, which is considered `true` in the `if` conditional.
When there isn't any query string in the url, `request.query_string`
returns the empty string `''`, which is also considered `true` in the
`if` conditional.
Therefore, the code after the guard clause inside the `regexp` method is
never reached, and also calls to the `regexp` method always return `nil`
making the check `if regexp` return `false` and always enter the `else`
section.
Commit: 9cf363001075a07b7c52eed172c58fed00dcc4cc
https://github.com/openSUSE/open-build-service/commit/9cf363001075a07b7c52ee...
Author: Eduardo J
Date: 2023-10-11 (Wed, 11 Oct 2023)
Changed paths:
M src/api/app/controllers/build/file_controller.rb
Log Message:
-----------
Merge pull request #15034 from eduardoj/refactoring/remove_not_reachable_code
Remove unreachable code in build/file controller
Compare: https://github.com/openSUSE/open-build-service/compare/29fa1bc06d72...9cf363...