mirror of
https://projects.vdr-developer.org/git/vdr-plugin-scraper2vdr.git
synced 2023-10-19 17:58:31 +02:00
fixed escaping when deleting outdated recordings
This commit is contained in:
parent
62610f6fc6
commit
2bfb7c7ce2
2
HISTORY
2
HISTORY
@ -29,3 +29,5 @@ Version 0.1.2
|
||||
Version 0.1.3
|
||||
- fixed a bug that series meta data is not loaded completely
|
||||
- fixed crash during shutdown of plugin
|
||||
|
||||
- fixed escaping when deleting outdated recordings
|
||||
|
4
update.c
4
update.c
@ -1181,8 +1181,10 @@ int cUpdate::CleanupRecordings(void) {
|
||||
int recStart = tRecordings->getIntValue(cTableRecordings::fiRecStart);
|
||||
string recPath = tRecordings->getStrValue(cTableRecordings::fiRecPath);
|
||||
if (!Recordings.GetByName(recPath.c_str())) {
|
||||
char escapedPath[recPath.size()+1];
|
||||
mysql_real_escape_string(connection->getMySql(), escapedPath, recPath.c_str(), recPath.size());
|
||||
stringstream delWhere("");
|
||||
delWhere << "uuid = '" << config.uuid << "' and rec_path = '" << recPath << "' and rec_start = " << recStart;
|
||||
delWhere << "uuid = '" << config.uuid << "' and rec_path = '" << escapedPath << "' and rec_start = " << recStart;
|
||||
tRecordings->deleteWhere(delWhere.str().c_str());
|
||||
numRecsDeleted++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user