diff options
| author | Aram Drevekenin <aram@poor.dev> | 2020-11-25 17:08:43 +0100 |
|---|---|---|
| committer | Aram Drevekenin <aram@poor.dev> | 2020-11-25 17:08:43 +0100 |
| commit | 489ade6eb8fc113368ec034efa340c157eb45629 (patch) | |
| tree | 420028d6e36bcdc23a996f872be4ef0514479afd /src/main.rs | |
| parent | hotfix(controls): clear buffer in normal mode (diff) | |
| download | sl0ppij-489ade6eb8fc113368ec034efa340c157eb45629.tar.gz sl0ppij-489ade6eb8fc113368ec034efa340c157eb45629.tar.xz sl0ppij-489ade6eb8fc113368ec034efa340c157eb45629.zip | |
hotfix(logging): atomically create tmp folders
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 0126069b..04e5d8de 100644 --- a/src/main.rs +++ b/src/main.rs @@ -26,7 +26,10 @@ use crate::layout::Layout; use crate::os_input_output::{get_os_input, OsApi}; use crate::pty_bus::{PtyBus, PtyInstruction, VteEvent}; use crate::screen::{Screen, ScreenInstruction}; -use crate::utils::{consts::MOSAIC_IPC_PIPE, logging::*}; +use crate::utils::{ + consts::{MOSAIC_IPC_PIPE, MOSAIC_TMP_DIR, MOSAIC_TMP_LOG_DIR}, + logging::*, +}; #[derive(Serialize, Deserialize, Debug)] enum ApiCommand { @@ -84,6 +87,8 @@ pub fn main() { stream.write_all(&api_command).unwrap(); } else { let os_input = get_os_input(); + atomic_create_dir(MOSAIC_TMP_DIR).unwrap(); + atomic_create_dir(MOSAIC_TMP_LOG_DIR).unwrap(); start(Box::new(os_input), opts); } } |
