@@ -10,7 +10,7 @@ use std::path::PathBuf;
10
10
use std:: fs:: remove_dir_all;
11
11
use postgres:: Connection ;
12
12
use rustc_serialize:: json:: Json ;
13
- use error:: Result ;
13
+ use error:: { Result , ResultExt } ;
14
14
15
15
16
16
/// List of targets supported by docs.rs
@@ -398,13 +398,15 @@ impl DocBuilder {
398
398
let file_name = format ! ( "{}-{}.{}" , spl[ 0 ] , rustc_version, spl[ 1 ] ) ;
399
399
let source_path = source. join ( & file_name) ;
400
400
let destination_path = destination. join ( & file_name) ;
401
- try!( copy ( source_path, destination_path) ) ;
401
+ try!( copy ( & source_path, & destination_path)
402
+ . chain_err ( || format ! ( "couldn't copy '{}' to '{}'" , source_path. display( ) , destination_path. display( ) ) ) ) ;
402
403
}
403
404
404
405
for file in files. 1 . iter ( ) {
405
406
let source_path = source. join ( file) ;
406
407
let destination_path = destination. join ( file) ;
407
- try!( copy ( source_path, destination_path) ) ;
408
+ try!( copy ( & source_path, & destination_path)
409
+ . chain_err ( || format ! ( "couldn't copy '{}' to '{}'" , source_path. display( ) , destination_path. display( ) ) ) ) ;
408
410
}
409
411
410
412
let conn = try!( connect_db ( ) ) ;
0 commit comments