Browse Source

Prevent popping the last segment of a path (ex. / or romfs:/)

pull/30/head
AzureMarker 3 years ago
parent
commit
d3df72e22f
No known key found for this signature in database
GPG Key ID: 47A133F3BF9D03D3
  1. 2
      ctru-rs/examples/file-explorer.rs

2
ctru-rs/examples/file-explorer.rs

@ -57,7 +57,7 @@ impl<'a> FileExplorer<'a> {
if input.contains(KeyPad::KEY_START) { if input.contains(KeyPad::KEY_START) {
break; break;
} else if input.contains(KeyPad::KEY_B) { } else if input.contains(KeyPad::KEY_B) && self.path.components().count() > 1 {
self.path.pop(); self.path.pop();
self.console.clear(); self.console.clear();
self.print_menu(); self.print_menu();

Loading…
Cancel
Save