Browse Source

added patchfiles directory check

pbs
Andy Newjack 5 years ago
parent
commit
de4a40cbff
  1. 11
      src/patch/main.rs

11
src/patch/main.rs

@ -378,6 +378,17 @@ impl Iterator for SendFileIterator {
fn main() {
println!("[patch] starting server");
match std::fs::read_dir("patchfiles/") {
Ok(_) => {},
Err(_) => {
match std::fs::create_dir("patchfiles/") {
Ok(_) => {},
Err(_) => {
panic!("Could not create patchfiles directory!");
},
}
},
}
let (patch_file_tree, patch_file_lookup) = generate_patch_tree("patchfiles/");
println!("[patch] files to patch:");
let mut indent = 0;

Loading…
Cancel
Save