Skip to content

Commit

Permalink
refactor(common): When including static files write the path as relat…
Browse files Browse the repository at this point in the history
…ive `./x/x`

Signed-off-by: PrajwalCH <prajwal.chapagain58@gmail.com>
  • Loading branch information
prajwalch committed Dec 29, 2023
1 parent 3a87868 commit 3c23a44
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ use std::fs::DirEntry;
use std::io;
use std::path::Path;

pub const PAGE_TEMPLATE: &str = include_str!("static/template.html");
pub const FILE_ICON: &str = include_str!("static/file.svg");
pub const DIR_ICON: &str = include_str!("static/folder.svg");
pub const PAGE_TEMPLATE: &str = include_str!("./static/template.html");
pub const FILE_ICON: &str = include_str!("./static/file.svg");
pub const DIR_ICON: &str = include_str!("./static/folder.svg");

pub fn build_not_found_page() -> String {
PAGE_TEMPLATE.replace("{title}", "Error Response").replace(
Expand Down

0 comments on commit 3c23a44

Please sign in to comment.