From 1c4d717c3c92bb983ba33059f7855e41fe11e0ae Mon Sep 17 00:00:00 2001 From: Phani Sajja Date: Tue, 7 May 2024 13:50:01 +0530 Subject: [PATCH] fix store path Signed-off-by: Phani Sajja --- src/core/auto_build.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/auto_build.rs b/src/core/auto_build.rs index a31ebdd..8ce4d24 100644 --- a/src/core/auto_build.rs +++ b/src/core/auto_build.rs @@ -1,7 +1,7 @@ use std::{ collections::{BTreeMap, BTreeSet, HashMap, HashSet}, fmt::Display, - fs::{self, File}, + fs::File, path::{Path, PathBuf}, sync::{mpsc::channel, Arc, RwLock}, time::Instant, @@ -19,6 +19,7 @@ use diesel::{ use ignore::WalkBuilder; use lazy_static::lazy_static; +use path_absolutize::Absolutize; use petgraph::{algo, stable_graph::NodeIndex}; use serde::{Deserialize, Serialize}; use thiserror::Error; @@ -364,7 +365,8 @@ impl AutoBuildContext { let store_path = if store_path.is_absolute() { store_path.clone() } else { - fs::canonicalize(auto_build_ctx_path.as_ref().join(store_path))? + auto_build_ctx_path.as_ref().join(store_path) + .absolutize()?.to_path_buf() }; let store = Store::new(&store_path).with_context(|| { format!(