1
Fork 0
mirror of https://github.com/thegeneralist01/archivr synced 2026-07-22 03:05:32 +02:00

fix: complete web UI smoke path

This commit is contained in:
TheGeneralist 2026-06-01 22:55:57 +02:00
parent 47e6f0e53f
commit 7a3d23624a
Signed by: thegeneralist01
SSH key fingerprint: SHA256:pp9qddbCNmVNoSjevdvQvM5z0DHN7LTa8qBMbcMq/R4
2 changed files with 14 additions and 0 deletions

View file

@ -270,6 +270,9 @@ fn determine_source(path: &str) -> Source {
return Source::Snapchat;
}
}
if Path::new(path).exists() {
return Source::Local;
}
Source::Other
}
@ -1196,6 +1199,16 @@ mod tests {
}
}
#[test]
fn test_existing_local_path_source() {
let path = env::current_dir().unwrap().join("Cargo.toml");
assert_eq!(
determine_source(path.to_str().unwrap()),
Source::Local,
"existing filesystem paths should be archived as local files"
);
}
#[test]
fn test_initialize_store_directories() {
let store_path = env::temp_dir().join(format!(