Radish alpha
r
Radicle terminal user interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Fix file not found error for rad-tui.log
✓ CI success Alexander Städing committed 6 days ago
commit eee6dea201c9bed6b9b4479afbca43032c804a20
parent d4484a8c000a89a3b838d4cf3afcefa329ac1740
1 passed (1 total) View logs
1 file changed +4 -1
modified bin/log.rs
@@ -11,9 +11,12 @@ pub fn enable() -> Result<(), anyhow::Error> {
        Ok(path) => {
            fs::create_dir_all(path.clone())?;

+
            let logfile = format!("{}/{FILE_PREFIX}.log", path.to_string_lossy());
            let file = fs::OpenOptions::new()
+
                .create(true)
                .append(true)
-
                .open(format!("{}/{FILE_PREFIX}.log", path.to_string_lossy()))?;
+
                .open(&logfile)
+
                .map_err(|e| anyhow::anyhow!("failed to open log file {}: {}", logfile, e))?;
            simple_logging::log_to(file, LevelFilter::Info);

            Ok(())