Skip to content

Commit

Permalink
Merge pull request #30 from getAlby/bugfix/path-formatting
Browse files Browse the repository at this point in the history
Fix path generation for log file and tor directory
  • Loading branch information
bumi authored Apr 16, 2022
2 parents 16d12e4 + 0ba4cb2 commit 74b5eed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ thread_local!(
static TOR_PORT: u16 = get_random_port();
static TOR_USERNAME: String = format!("u{}", get_random_string());
static TOR_PASSWORD: String = get_random_string();
static LOG_FILE: RefCell<String> = RefCell::new(format!("{}{}",std::env::temp_dir().to_string_lossy(),"alby.log"));
static TOR_DIR: RefCell<String> = RefCell::new(format!("{}{}",std::env::temp_dir().to_string_lossy(),"alby-tor"));
static LOG_FILE: RefCell<String> = RefCell::new(format!("{}", std::env::temp_dir().join("alby.log").to_string_lossy()));
static TOR_DIR: RefCell<String> = RefCell::new(format!("{}",std::env::temp_dir().join("alby-tor").to_string_lossy()));
static TOR_STARTED: RefCell<bool> = RefCell::new(false);
static TOR_READY: RefCell<bool> = RefCell::new(false);
static DEBUG_MODE: RefCell<bool> = RefCell::new(false);
Expand Down Expand Up @@ -203,7 +203,7 @@ impl Drop for LockFile {

fn create_lock_file() -> Option<LockFile> {
let path = get_lock_file_path();
// Log file is not prepared at this moment,
// Log file is not prepared at this moment,
// so all debug info should be printed to std_err.
let debug_mode = is_debug_mode();

Expand Down

0 comments on commit 74b5eed

Please sign in to comment.