Skip to content

Commit

Permalink
fix issue #62
Browse files Browse the repository at this point in the history
  • Loading branch information
38 committed Feb 18, 2023
1 parent f0e0da2 commit 29ba327
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"program": "target/debug/d4tools",
"env": {"RUST_LOG": "info"},
"args": ["view", "/tmp/repo.d4", "chr1:1-100000"],
"args": ["view", "/tmp/d4-test-data/abc.d4"],
"cwd": "/tmp"
},
{
Expand Down
7 changes: 4 additions & 3 deletions d4-framefile/src/directory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -460,14 +460,15 @@ impl<T: Read + Seek> Directory<T> {
) -> bool {
for Entry { name, kind, .. } in self.entries() {
prefix.push(&name);
if !handle(prefix.as_path(), kind) {
if handle(prefix.as_path(), kind) == false {
prefix.pop();
return false;
return true;
}

if kind == EntryKind::SubDir {
if let Ok(subdir) = self.open_directory(&name) {
if subdir.recurse_impl(handle, prefix) {
if subdir.recurse_impl(handle, prefix) == false {
prefix.pop();
return true;
}
}
Expand Down

0 comments on commit 29ba327

Please sign in to comment.