From c6eb0669531c709167a688b30326c17b33ac8739 Mon Sep 17 00:00:00 2001 From: Stephan Dilly Date: Mon, 15 Jun 2020 02:22:10 +0200 Subject: [PATCH] cache config path call --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index cdb19be7..5bb7343e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -215,8 +215,9 @@ fn migrate_config() -> Result<()> { !entry.file_name().to_string_lossy().ends_with(".log") }); + let config_path: PathBuf = get_app_config_path()?; for entry in entries { - let mut config_path: PathBuf = get_app_config_path()?; + let mut config_path: PathBuf = config_path.clone(); config_path.push(entry.file_name()); fs::rename(entry.path(), config_path)?; }