diff --git a/src/main.rs b/src/main.rs index 62bc74b2..c8dc5a39 100644 --- a/src/main.rs +++ b/src/main.rs @@ -71,13 +71,13 @@ fn setup(config_folder: &Path) -> IoResult<(Data>, ServerConfig, // Create necessary directories. fs::create_dir_all(&server_config.upload_path)?; for paste_type in &[PasteType::Url, PasteType::Oneshot, PasteType::OneshotUrl] { - let _ = paste_type + let upload_path = paste_type .get_path(&server_config.upload_path) .ok_or(IoError::new( IoErrorKind::Other, String::from("Invalid upload path"), - )) - .map(fs::create_dir_all)?; + ))?; + fs::create_dir_all(upload_path)?; } // Set up a watcher for the configuration file changes.