From f654c42426e7b9ef14cf0cb25fcafc13d37e2fd1 Mon Sep 17 00:00:00 2001 From: Jan-Erik Rediger Date: Wed, 19 Sep 2018 20:36:32 +0200 Subject: [PATCH] Don't strip relative path of additional javascript files Previously, additional JavaScript files inside a directory were correctly copied (with their parent created), but the link to it was stripped of that parent. There's no need for that (and it was not done for CSS) --- src/renderer/html_handlebars/hbs_renderer.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/renderer/html_handlebars/hbs_renderer.rs b/src/renderer/html_handlebars/hbs_renderer.rs index 3f87ba4d..b7f4cde6 100644 --- a/src/renderer/html_handlebars/hbs_renderer.rs +++ b/src/renderer/html_handlebars/hbs_renderer.rs @@ -422,13 +422,7 @@ fn make_data( for script in &html.additional_js { match script.strip_prefix(root) { Ok(p) => js.push(p.to_str().expect("Could not convert to str")), - Err(_) => js.push( - script - .file_name() - .expect("File has a file name") - .to_str() - .expect("Could not convert to str"), - ), + Err(_) => js.push(script.to_str().expect("Could not convert to str")), } } data.insert("additional_js".to_owned(), json!(js));