mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 15:21:56 -05:00
Revert "Made possible to specify where to dump the contents when loading a ".pck" file"
This reverts commit 3c261e0dfa.
This was not so useful as is due to the way dependency paths are stored
in scenes and resources.
This commit is contained in:
@@ -160,7 +160,7 @@ unzFile ZipArchive::get_file_handle(String p_file) const {
|
||||
return pkg;
|
||||
}
|
||||
|
||||
bool ZipArchive::try_open_pack(const String &p_path, bool p_replace_files, const String &p_destination) {
|
||||
bool ZipArchive::try_open_pack(const String &p_path, bool p_replace_files) {
|
||||
|
||||
//printf("opening zip pack %ls, %i, %i\n", p_name.c_str(), p_name.extension().nocasecmp_to("zip"), p_name.extension().nocasecmp_to("pcz"));
|
||||
if (p_path.get_extension().nocasecmp_to("zip") != 0 && p_path.get_extension().nocasecmp_to("pcz") != 0)
|
||||
@@ -206,26 +206,7 @@ bool ZipArchive::try_open_pack(const String &p_path, bool p_replace_files, const
|
||||
f.package = pkg_num;
|
||||
unzGetFilePos(zfile, &f.file_pos);
|
||||
|
||||
String fname;
|
||||
if (p_destination != "") {
|
||||
String destination = "res://" + p_destination;
|
||||
if (!destination.ends_with("/")) {
|
||||
destination += "/";
|
||||
}
|
||||
|
||||
DirAccess *dir = DirAccess::create(DirAccess::ACCESS_RESOURCES);
|
||||
if (!dir->dir_exists(destination)) {
|
||||
memdelete(dir);
|
||||
|
||||
return false;
|
||||
}
|
||||
memdelete(dir);
|
||||
|
||||
fname = destination + filename_inzip;
|
||||
} else {
|
||||
fname = String("res://") + filename_inzip;
|
||||
}
|
||||
|
||||
String fname = String("res://") + filename_inzip;
|
||||
files[fname] = f;
|
||||
|
||||
uint8_t md5[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
|
||||
Reference in New Issue
Block a user