mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-30 11:38:50 -07:00
Code clean up
This changes were proposed by @PiotrNawrot in these PRs: #2967, #2970.
This commit is contained in:
parent
f5b0008158
commit
4a76526417
2 changed files with 12 additions and 19 deletions
|
@ -688,18 +688,14 @@ void WebApplication::parsePath()
|
|||
|
||||
// check action for requested path
|
||||
QStringList pathItems = request().path.split('/', QString::SkipEmptyParts);
|
||||
if (!pathItems.empty()) {
|
||||
if (actions_.contains(pathItems.front())) {
|
||||
scope_ = pathItems.front();
|
||||
pathItems.pop_front();
|
||||
}
|
||||
if (!pathItems.empty() && actions_.contains(pathItems.front())) {
|
||||
scope_ = pathItems.front();
|
||||
pathItems.pop_front();
|
||||
}
|
||||
|
||||
if (!pathItems.empty()) {
|
||||
if (actions_[scope_].contains(pathItems.front())) {
|
||||
action_ = pathItems.front();
|
||||
pathItems.pop_front();
|
||||
}
|
||||
if (!pathItems.empty() && actions_[scope_].contains(pathItems.front())) {
|
||||
action_ = pathItems.front();
|
||||
pathItems.pop_front();
|
||||
}
|
||||
|
||||
args_ = pathItems;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue