summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorqkzk <qu3nt1n@gmail.com>2023-12-29 00:12:38 +0100
committerqkzk <qu3nt1n@gmail.com>2023-12-29 00:12:38 +0100
commit0302a9f5fafe6981d31015000f1a98f1a7b69d9e (patch)
treeb5de1fdda23579dc5aa90daf404d205832fbab11
parent8dca3ba9c09931d0ebb4245992aa9769a288fb28 (diff)
dev
-rw-r--r--development.md6
-rw-r--r--src/app/tab.rs3
-rw-r--r--src/modes/display/directory.rs6
3 files changed, 14 insertions, 1 deletions
diff --git a/development.md b/development.md
index f9474a1..2fad5fa 100644
--- a/development.md
+++ b/development.md
@@ -765,6 +765,12 @@ New view: Tree ! Toggle with 't', fold with 'z'. Navigate normally.
- [x] FIX: unfold shouldn't unfold every child
- [x] don't use -e for every terminal. See [rifle.conf](https://github.com/ranger/ranger/blob/136416c7e2ecc27315fe2354ecadfe09202df7dd/ranger/config/rifle.conf#L244)
- [x] FIX: preview a symlink crashes the app
+- [ ] FIX: opening an inaccessible dir crashes the app
+ - [ ] std set env crashes, don't ? it
+ - [ ] prevent entering like ranger does
+ - [ ] metadata le chemin avant. is_dir, metadata.permissions.readonly, metadata.permissions.writeonly
+ - [ ] fix toutes les écritures, check avant. Rename, Copy, Move, Delete, Trash, Untrash, Compress, Decompress
+- [ ] navigating in menus erase display - can't reproduce ?
## TODO
diff --git a/src/app/tab.rs b/src/app/tab.rs
index a92febb..e8c1d12 100644
--- a/src/app/tab.rs
+++ b/src/app/tab.rs
@@ -445,7 +445,8 @@ impl Tab {
self.make_tree(Some(self.settings.sort_kind))?;
}
self.window.reset(self.directory.content.len());
- std::env::set_current_dir(path)?;
+ crate::log_info!("done cd: {path}", path = path.display());
+ let _ = std::env::set_current_dir(path);
Ok(())
}
diff --git a/src/modes/display/directory.rs b/src/modes/display/directory.rs
index fb96ad8..75c900b 100644
--- a/src/modes/display/directory.rs
+++ b/src/modes/display/directory.rs
@@ -57,7 +57,13 @@ impl Directory {
settings: &TabSettings,
users: &Users,
) -> Result<()> {
+ log_info!("entering {path}", path = path.display());
self.content = Self::files(path, settings.show_hidden, &settings.filter, users)?;
+ log_info!(
+ "read {path}: {nb} files",
+ path = path.display(),
+ nb = self.content.len()
+ );
settings.sort_kind.sort(&mut self.content);
self.index = 0;
if !self.content.is_empty() {