mirror of
https://github.com/open-goal/launcher.git
synced 2024-10-19 14:47:36 -04:00
Properly reverse order when applying texture packs (#299)
This commit is contained in:
parent
15ad8a57af
commit
504031a699
|
@ -247,7 +247,11 @@ pub async fn update_texture_pack_data(
|
|||
// Reset texture replacement directory
|
||||
delete_dir(&game_texture_pack_dir)?;
|
||||
create_dir(&game_texture_pack_dir)?;
|
||||
for pack in config_lock.game_enabled_textured_packs(&game_name) {
|
||||
for pack in config_lock
|
||||
.game_enabled_textured_packs(&game_name)
|
||||
.iter()
|
||||
.rev()
|
||||
{
|
||||
let texture_pack_dir = install_path
|
||||
.join("features")
|
||||
.join(&game_name)
|
||||
|
|
|
@ -119,9 +119,6 @@ pub fn check_if_zip_contains_top_level_dir(
|
|||
let mut zip = zip::ZipArchive::new(reader)?;
|
||||
for i in 0..zip.len() {
|
||||
let file = zip.by_index(i)?;
|
||||
if !file.is_dir() {
|
||||
continue;
|
||||
}
|
||||
// Check if the entry is a directory and has the desired folder name
|
||||
if file.name().starts_with(&expected_dir) {
|
||||
return Ok(true);
|
||||
|
|
Loading…
Reference in a new issue