From f87e2ad0f70fdb1d74681cd78fb56ba7a3e28419 Mon Sep 17 00:00:00 2001 From: AzureMarker Date: Thu, 27 Jan 2022 20:23:55 -0800 Subject: [PATCH 1/2] Move romfs folder into examples folder --- ctru-rs/Cargo.toml | 3 +++ ctru-rs/{ => examples}/romfs/test-file.txt | 0 2 files changed, 3 insertions(+) rename ctru-rs/{ => examples}/romfs/test-file.txt (100%) 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/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 From d3df72e22fd0c57201d620e6cf9a2d2e3a8a031c Mon Sep 17 00:00:00 2001 From: AzureMarker Date: Thu, 27 Jan 2022 20:24:34 -0800 Subject: [PATCH 2/2] Prevent popping the last segment of a path (ex. / or romfs:/) --- ctru-rs/examples/file-explorer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();