chiark / gitweb /
check bundled_sources exist
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 6 Sep 2020 23:07:04 +0000 (00:07 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 6 Sep 2020 23:07:04 +0000 (00:07 +0100)
server.toml
src/bin/server.rs

index 81e72ce3c6b28b1bed8ef1d436668add4b7fdf44..4426726f83719c86e2399c4e8ba860f564e54289 100644 (file)
@@ -5,6 +5,7 @@
 
 save_directory = "/home/rustcargo/Rustup/Game/server"
 template_dir = "/home/ian/Rustup/Game/server/templates"
+bundled_sources = "/home/rustcargo/Rustup/Game/server/target/bundled-sources"
 
 [log]
 global_level = 'debug'
index fa5ee02f45c7095406772d29e606b10dc1626b94..9698194a7e0c89da09401adf47dcf2b88315259c 100644 (file)
@@ -83,6 +83,11 @@ fn main() {
 
   flexi_logger::Logger::with(c.log.clone()).start()?;
 
+  let bundled_sources = &c.bundled_sources;
+  fs::metadata(format!("{}/index.html", bundled_sources))
+    .with_context(||bundled_sources.clone())
+    .context("check bundled-sources directory's index.html")?;
+
   load_games()?;
 
   let cl = CommandListener::new()?;