summaryrefslogtreecommitdiff
path: root/src/collect_files.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/collect_files.rs')
-rw-r--r--src/collect_files.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/collect_files.rs b/src/collect_files.rs
index 4eee1dc..7a3c464 100644
--- a/src/collect_files.rs
+++ b/src/collect_files.rs
@@ -93,7 +93,7 @@ impl Website {
static_dirs: Vec::new(),
name: match Entry::from_path(path) {
Ok(entry) => entry.name,
- Err(err) => error!("Couldn't open {:?}: {:?}", &path, err),
+ Err(err) => fatal!("Couldn't open {:?}: {:?}", &path, err),
},
config: HashMap::new(),
};
@@ -118,7 +118,7 @@ impl Website {
// Generate parent URL, used only for files.
let source_path = entry.original_path.clone();
let relative_path = source_path.strip_prefix(prefix).unwrap_or_else(
- |_| error!("Path doesn't start with {prefix:?}: {source_path:?}"));
+ |_| fatal!("Path doesn't start with {prefix:?}: {source_path:?}"));
let mut parents: Vec<_> = relative_path.components()
.map(|c| c.as_os_str().to_string_lossy().to_string()).collect();
parents.pop(); // Remove file segment.
@@ -130,7 +130,7 @@ impl Website {
for child in traverse_directory(&entry).unwrap() {
let source_path = child.original_path;
let relative_path = source_path.strip_prefix(&entry.original_path).unwrap_or_else(
- |_| error!("Path doesn't start with {prefix:?}: {source_path:?}"))
+ |_| fatal!("Path doesn't start with {prefix:?}: {source_path:?}"))
.as_os_str().to_string_lossy().to_string();
let full_url = format!("{stripped}/{relative_path}");
self.static_files.push(StaticItem { full_url, source_path, last_modified })
@@ -143,7 +143,7 @@ impl Website {
}
}
} else if parents.is_empty() && entry.name.to_lowercase() == "toaster.conf" {
- verbose!("Reading configuration file at {path:?}");
+ info!("Reading configuration file at {path:?}");
// Parse the config file.
let config = std::fs::read_to_string(&source_path).unwrap();
let mut key = None;