Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmuizel committed Jan 17, 2024
1 parent 0caf721 commit 1a6455f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ impl ExpectedText<'_> {
let file_path = if filename.ends_with(".pdf.link") {
let docs_cache = "tests/docs_cache";
if !std::path::Path::new(docs_cache).exists() {
std::fs::create_dir(docs_cache).unwrap();
// This might race with exists test above, but that's fine
if let Err(e) = std::fs::create_dir(docs_cache) {
if e.kind() != std::io::ErrorKind::AlreadyExists {
panic!("Failed to create directory {}, {}", docs_cache, e);
}
}
}
let file_path = format!("{}/{}", docs_cache, filename.replace(".link", ""));
if std::path::Path::new(&file_path).exists() {
Expand Down

0 comments on commit 1a6455f

Please sign in to comment.