Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
fix: canonicalize root path in ResourceIndex::load()
Browse files Browse the repository at this point in the history
Signed-off-by: Tarek <tareknaser360@gmail.com>
  • Loading branch information
tareknaser committed Mar 2, 2024
1 parent 237cd04 commit 14a27e6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ impl ResourceIndex {
/// persisting the new index version, use [`ResourceIndex::provide()`] method.
pub fn load<P: AsRef<Path>>(root_path: P) -> Result<Self> {
let root_path: PathBuf = root_path.as_ref().to_owned();
let root_path = fs::canonicalize(&root_path)?;

let index_path: PathBuf = root_path.join(ARK_FOLDER).join(INDEX_PATH);
log::info!("Loading the index from file {}", index_path.display());
Expand Down

0 comments on commit 14a27e6

Please sign in to comment.