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 {
203
203
target : Option < & str > ,
204
204
is_default_target : bool )
205
205
-> Result < ( ) > {
206
- let crate_doc_path = PathBuf :: from ( & self . options . chroot_path )
206
+ let mut crate_doc_path = PathBuf :: from ( & self . options . chroot_path )
207
207
. join ( "home" )
208
208
. 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
+
211
216
let mut destination = PathBuf :: from ( & self . options . destination )
212
217
. join ( format ! ( "{}/{}" ,
213
218
package. manifest( ) . name( ) ,
@@ -219,7 +224,9 @@ impl DocBuilder {
219
224
// default target: x86_64-pc-windows-msvc. But since it will be built under
220
225
// cratesfyi/x86_64-pc-windows-msvc we still need target in this function.
221
226
if !is_default_target {
222
- destination. push ( target. unwrap_or ( "" ) ) ;
227
+ if let Some ( target) = target {
228
+ destination. push ( target) ;
229
+ }
223
230
}
224
231
225
232
copy_doc_dir ( crate_doc_path,
You can’t perform that action at this time.
0 commit comments