Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ resolver = "2"
members = [
"rpgmxp-project",
"rpgmxp-types",
"rpgm-tool",
"rpgmvx-types", "rpgm-common-types",
"rpgmxp-tool",
"rpgmvx-types",
"rpgm-common-types",
]

[profile.release]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use camino::Utf8PathBuf;
use object::LittleEndian as LE;
use object::U16;
use object::U32;
use std::ffi::OsStr;
use std::fs::File;
use std::io::Read;
use std::path::Path;
Expand Down Expand Up @@ -727,14 +728,31 @@ impl FileEntryIter {
Self::WalkDir {
input_path, iter, ..
} => {
// Filter out dir entries, to keep similar behavior with rgssad.
let entry = loop {
match iter.next() {
Some(Ok(entry)) if !entry.file_type().is_dir() => break entry,
Some(Ok(_entry)) => {}
let entry = match iter.next() {
Some(Ok(entry)) => entry,
Some(Err(error)) => return Err(error).context("failed to read dir entry"),
None => return Ok(None),
};

// Rgssad archives only contain the "Data" and "Graphics" folders at the top level.
// Only include these folders for parity with rgssad archives.
if entry.depth() == 1
&& ![OsStr::new("Data"), OsStr::new("Graphics")]
.contains(&entry.file_name())
{
if entry.file_type().is_dir() {
iter.skip_current_dir();
}
continue;
}

// Filter out dir entries, to keep similar behavior with rgssad.
if entry.file_type().is_dir() {
continue;
}

break entry;
};
ensure!(!entry.path_is_symlink());

Expand Down
File renamed without changes.
File renamed without changes.