ours
| 230 | |
| 231 | // ours |
| 232 | std::pair<QString, QString> MMCZip::findFolderOfFileInZip(QuaZip * zip, QSet<const QString> what, const QString &root) |
| 233 | { |
| 234 | std::deque<QString> pathsToTraverse; |
| 235 | pathsToTraverse.push_back(root); |
| 236 | while (!pathsToTraverse.empty()) |
| 237 | { |
| 238 | QString currentPath = pathsToTraverse.front(); |
| 239 | pathsToTraverse.pop_front(); |
| 240 | QuaZipDir rootDir(zip, currentPath); |
| 241 | |
| 242 | for(auto fileName: rootDir.entryList(QDir::Files)) |
| 243 | { |
| 244 | if (what.contains(fileName)) |
| 245 | return {currentPath, fileName}; |
| 246 | } |
| 247 | for(auto fileName: rootDir.entryList(QDir::Dirs)) |
| 248 | { |
| 249 | pathsToTraverse.push_back(rootDir.path() + fileName); |
| 250 | } |
| 251 | } |
| 252 | return {QString(), QString()}; |
| 253 | } |
| 254 | |
| 255 | // ours |
| 256 | bool MMCZip::findFilesInZip(QuaZip * zip, const QString & what, QStringList & result, const QString &root) |