File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -203,11 +203,16 @@ impl DocBuilder {
203203 target : Option < & str > ,
204204 is_default_target : bool )
205205 -> Result < ( ) > {
206- let crate_doc_path = PathBuf :: from ( & self . options . chroot_path )
206+ let mut crate_doc_path = PathBuf :: from ( & self . options . chroot_path )
207207 . join ( "home" )
208208 . join ( & self . options . chroot_user )
209- . join ( "cratesfyi" )
210- . join ( target. unwrap_or ( "" ) ) ;
209+ . join ( "cratesfyi" ) ;
210+
211+ // docs are available in cratesfyi/$TARGET when target is being used
212+ if let Some ( target) = target {
213+ crate_doc_path. push ( target) ;
214+ }
215+
211216 let mut destination = PathBuf :: from ( & self . options . destination )
212217 . join ( format ! ( "{}/{}" ,
213218 package. manifest( ) . name( ) ,
@@ -219,7 +224,9 @@ impl DocBuilder {
219224 // default target: x86_64-pc-windows-msvc. But since it will be built under
220225 // cratesfyi/x86_64-pc-windows-msvc we still need target in this function.
221226 if !is_default_target {
222- destination. push ( target. unwrap_or ( "" ) ) ;
227+ if let Some ( target) = target {
228+ destination. push ( target) ;
229+ }
223230 }
224231
225232 copy_doc_dir ( crate_doc_path,
You can’t perform that action at this time.
0 commit comments