-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Updated] Adjust the logic for bouquet search to support regex
- Loading branch information
Showing
1 changed file
with
2 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ | |
#include <fstream> | ||
#include <stdexcept> | ||
#include <exception> | ||
#include <regex> | ||
|
||
/* | ||
* Copyright (C) 2017 Marcus Metzler <[email protected]> | ||
|
@@ -2677,7 +2678,7 @@ RESULT eDVBDB::removeBouquet(const std::string &filename) | |
if (entry->d_type == DT_REG) | ||
{ | ||
std::string path = entry->d_name; | ||
if (path.find(filename) != std::string::npos) | ||
if (std::regex_search(path, std::regex("^" + filename + "$"))) | ||
{ | ||
std::string bouquetquery = "FROM BOUQUET \"" + path + "\" ORDER BY bouquet"; | ||
eServiceReference bouquetref(eServiceReference::idDVB, eServiceReference::flagDirectory, bouquetquery); | ||
|