diff options
author | Kyohei Uto <im@kyoheiu.dev> | 2024-01-21 06:02:17 +0900 |
---|---|---|
committer | Kyohei Uto <im@kyoheiu.dev> | 2024-01-21 06:02:17 +0900 |
commit | 368faf5ed10f25840b84a8bf6b086a450262fd68 (patch) | |
tree | b872e623df574b8c340e2c6db4c53fab8d7ff5ad | |
parent | 67e13674f5aac693d617a879be2d7faa2f95c9c3 (diff) |
Remove unnecessary path check
-rw-r--r-- | src/run.rs | 11 |
1 files changed, 0 insertions, 11 deletions
@@ -45,14 +45,6 @@ pub fn run(arg: PathBuf, log: bool, choosefiles_path: Option<PathBuf>) -> Result let shell_pid: Option<String> = env::var("SHELL_PID").ok(); - //Prepare config and data local path. - let config_dir_path = { - let mut path = dirs::config_dir() - .ok_or_else(|| FxError::Dirs("Cannot read the config directory.".to_string()))?; - path.push(FELIX); - path - }; - //Prepare data local and trash dir path. let data_local_path = { let mut path = dirs::data_local_dir() .ok_or_else(|| FxError::Dirs("Cannot read the data local directory.".to_string()))?; @@ -74,9 +66,6 @@ pub fn run(arg: PathBuf, log: bool, choosefiles_path: Option<PathBuf>) -> Result path.push(FELIX); path }; - if !config_dir_path.exists() { - std::fs::create_dir_all(&config_dir_path)?; - } if !data_local_path.exists() { std::fs::create_dir_all(&data_local_path)?; } |