@@ -171,6 +171,13 @@ fn check(cache: &mut Cache,
171
171
}
172
172
}
173
173
174
+ if let Some ( extension) = path. extension ( ) {
175
+ // don't check these files
176
+ if extension == "png" {
177
+ return ;
178
+ }
179
+ }
180
+
174
181
// Alright, if we've found a file name then this file had better
175
182
// exist! If it doesn't then we register and print an error.
176
183
if path. exists ( ) {
@@ -188,7 +195,9 @@ fn check(cache: &mut Cache,
188
195
let res = load_file ( cache, root, path. clone ( ) , FromRedirect ( false ) ) ;
189
196
let ( pretty_path, contents) = match res {
190
197
Ok ( res) => res,
191
- Err ( LoadError :: IOError ( err) ) => panic ! ( format!( "{}" , err) ) ,
198
+ Err ( LoadError :: IOError ( err) ) => {
199
+ panic ! ( format!( "error loading {}: {}" , path. display( ) , err) ) ;
200
+ }
192
201
Err ( LoadError :: BrokenRedirect ( target, _) ) => {
193
202
* errors = true ;
194
203
println ! ( "{}:{}: broken redirect to {}" ,
@@ -200,6 +209,13 @@ fn check(cache: &mut Cache,
200
209
Err ( LoadError :: IsRedirect ) => unreachable ! ( ) ,
201
210
} ;
202
211
212
+ // we don't check the book for fragments because they're added via JS
213
+ for book in [ "book/" , "nomicon/" ] . iter ( ) {
214
+ if !pretty_path. to_str ( ) . unwrap ( ) . starts_with ( book) {
215
+ return ;
216
+ }
217
+ }
218
+
203
219
if let Some ( ref fragment) = fragment {
204
220
// Fragments like `#1-6` are most likely line numbers to be
205
221
// interpreted by javascript, so we're ignoring these
0 commit comments