summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyohei Uto <im@kyoheiu.dev>2024-01-21 06:02:17 +0900
committerKyohei Uto <im@kyoheiu.dev>2024-01-21 06:02:17 +0900
commit368faf5ed10f25840b84a8bf6b086a450262fd68 (patch)
treeb872e623df574b8c340e2c6db4c53fab8d7ff5ad
parent67e13674f5aac693d617a879be2d7faa2f95c9c3 (diff)
Remove unnecessary path check
-rw-r--r--src/run.rs11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/run.rs b/src/run.rs
index 170a31f..6fcb8f6 100644
--- a/src/run.rs
+++ b/src/run.rs
@@ -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)?;
}