From 2abb429bbcf7a9d9e3ab84e49c9d11de94109680 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 29 Jun 2022 09:13:00 +0800 Subject: write debug information in any case to gain some insights on `open::that()` --- src/interactive/app/handlers.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/interactive/app/handlers.rs b/src/interactive/app/handlers.rs index eae0e6c..beffcb1 100644 --- a/src/interactive/app/handlers.rs +++ b/src/interactive/app/handlers.rs @@ -50,7 +50,14 @@ impl CursorDirection { impl AppState { pub fn open_that(&self, traversal: &Traversal) { if let Some(idx) = self.selected { - open::that(path_of(&traversal.tree, idx)).ok(); + let res = open::that(path_of(&traversal.tree, idx)); + use std::io::Write; + std::fs::OpenOptions::new() + .create(true) + .append(true) + .open("dua-open.dbg") + .and_then(|mut file| file.write_all(format!("{:?}", res).as_bytes())) + .ok(); } } -- cgit v1.2.3