Skip to content
Snippets Groups Projects
Commit 888300e2 authored by jdh8d's avatar jdh8d
Browse files

Fix to support filenames starting with non-alphabetics

Former-commit-id: 5d1ae43227836aec4c3adcedd0b4e9ed71031d65
parent 879dbfb6
No related branches found
No related tags found
No related merge requests found
......@@ -33,7 +33,8 @@ int get_file_id(char *progName, char *md5hash)
string query = "SELECT file_id FROM file_info WHERE hash=";
query += txn.quote(string(md5hash));
query += " AND url LIKE";
query += txn.quote(string("%") + string(progName) + string("%"));
/* the plus 7 here is to drop "psprog_" from the name */
query += txn.quote(string("%") + string(progName+7) + string("%"));
result r = txn.exec(query);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment