From 4e9f8ff708dae197416e17fca29862194de4c25a Mon Sep 17 00:00:00 2001 From: "Jakob L. Kreuze" Date: Fri, 19 Jun 2020 19:47:03 -0400 Subject: [birka-web] handle unused `symlink` Err. --- src/birka-web.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/birka-web.rs b/src/birka-web.rs index e9bb81a..b4d1d12 100644 --- a/src/birka-web.rs +++ b/src/birka-web.rs @@ -312,6 +312,10 @@ fn add_to_store(file: &database::File, file_dir: &str) { let store_path = store_filename(file.id, &file.path); let store_path = Path::new(file_dir).join(store_path); symlink(&file.path, &store_path).ok(); + if !store_path.exists() { + panic!("could not create symlink {:?}!", store_path); + } + let thumb_path = thumb_filename(file.id, &file.path); let thumb_path = Path::new(file_dir).join(&thumb_path); if !thumb_path.exists() { -- cgit v1.3