fix: datapack/resourcepack parsing

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97 2025-08-21 14:48:22 +03:00
parent 542ab62ab7
commit 8c9b504382
No known key found for this signature in database
GPG Key ID: 55EF5DA53DB36318
3 changed files with 0 additions and 14 deletions

View File

@ -64,8 +64,6 @@ class DataPack : public Resource {
[[nodiscard]] int compare(Resource const& other, SortType type) const override;
[[nodiscard]] bool applyFilter(QRegularExpression filter) const override;
virtual QString directory() { return "/data"; }
protected:
mutable QMutex m_data_lock;

View File

@ -23,6 +23,4 @@ class ResourcePack : public DataPack {
/** Gets, respectively, the lower and upper versions supported by the set pack format. */
std::pair<Version, Version> compatibleVersions() const override;
QString directory() override { return "/assets"; }
};

View File

@ -73,11 +73,6 @@ bool processFolder(DataPack* pack, ProcessingLevel level)
return mcmeta_invalid(); // mcmeta file isn't a valid file
}
QFileInfo data_dir_info(FS::PathCombine(pack->fileinfo().filePath(), pack->directory()));
if (!data_dir_info.exists() || !data_dir_info.isDir()) {
return false; // data dir does not exists or isn't valid
}
if (level == ProcessingLevel::BasicInfoOnly) {
return true; // only need basic info already checked
}
@ -141,11 +136,6 @@ bool processZIP(DataPack* pack, ProcessingLevel level)
return mcmeta_invalid(); // could not set pack.mcmeta as current file.
}
QuaZipDir zipDir(&zip);
if (!zipDir.exists(pack->directory())) {
return false; // data dir does not exists at zip root
}
if (level == ProcessingLevel::BasicInfoOnly) {
zip.close();
return true; // only need basic info already checked