diff --git a/ctru-rs/Cargo.toml b/ctru-rs/Cargo.toml index c10e13e..2d81a13 100644 --- a/ctru-rs/Cargo.toml +++ b/ctru-rs/Cargo.toml @@ -30,3 +30,6 @@ time = "0.3.7" [features] default = ["romfs"] romfs = [] + +[package.metadata.cargo-3ds] +romfs_dir = "examples/romfs" diff --git a/ctru-rs/examples/file-explorer.rs b/ctru-rs/examples/file-explorer.rs index 8a249f9..a334301 100644 --- a/ctru-rs/examples/file-explorer.rs +++ b/ctru-rs/examples/file-explorer.rs @@ -57,7 +57,7 @@ impl<'a> FileExplorer<'a> { if input.contains(KeyPad::KEY_START) { break; - } else if input.contains(KeyPad::KEY_B) { + } else if input.contains(KeyPad::KEY_B) && self.path.components().count() > 1 { self.path.pop(); self.console.clear(); self.print_menu(); diff --git a/ctru-rs/romfs/test-file.txt b/ctru-rs/examples/romfs/test-file.txt similarity index 100% rename from ctru-rs/romfs/test-file.txt rename to ctru-rs/examples/romfs/test-file.txt