Rebased after #438

This commit is contained in:
Michael Bryan 2017-10-04 19:55:21 +08:00
parent 1b5137c84e
commit d37821c194
No known key found for this signature in database
GPG Key ID: E9C602B0D9A998DC
3 changed files with 4 additions and 5 deletions

View File

@ -3,7 +3,7 @@ extern crate staticfile;
extern crate ws; extern crate ws;
use std; use std;
use std::path::{Path, PathBuf}; use std::path::PathBuf;
use self::iron::{status, AfterMiddleware, Chain, Iron, IronError, IronResult, Request, Response, use self::iron::{status, AfterMiddleware, Chain, Iron, IronError, IronResult, Request, Response,
Set}; Set};
use clap::{App, ArgMatches, SubCommand}; use clap::{App, ArgMatches, SubCommand};

View File

@ -75,17 +75,17 @@ where
}; };
// Add the theme directory to the watcher // Add the theme directory to the watcher
watcher.watch(book.get_theme_path(), Recursive) watcher.watch(book.theme_dir(), Recursive)
.unwrap_or_default(); .unwrap_or_default();
// Add the book.{json,toml} file to the watcher if it exists, because it's not // Add the book.{json,toml} file to the watcher if it exists, because it's not
// located in the source directory // located in the source directory
if watcher.watch(book.get_root().join("book.json"), NonRecursive) if watcher.watch(book.root.join("book.json"), NonRecursive)
.is_err() .is_err()
{ {
// do nothing if book.json is not found // do nothing if book.json is not found
} }
if watcher.watch(book.get_root().join("book.toml"), NonRecursive) if watcher.watch(book.root.join("book.toml"), NonRecursive)
.is_err() .is_err()
{ {
// do nothing if book.toml is not found // do nothing if book.toml is not found

View File

@ -46,4 +46,3 @@ use tempdir::TempDir;
// assert_eq!(book.get_destination(), dir.path().join("baz")); // assert_eq!(book.get_destination(), dir.path().join("baz"));
// assert_eq!(book.get_mathjax_support(), true); // assert_eq!(book.get_mathjax_support(), true);
// } // }
>>>>>>> Integration tests pass again