File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -316,14 +316,15 @@ fn main() -> io::Result<()> {
316316 if !copy_done {
317317 fs:: create_dir_all ( static_path) . unwrap ( ) ;
318318 // recursive copy
319- let mut stack = vec ! [ doc_dir. join( "static.files" ) ] ;
319+ let doc_static_dir = doc_dir. join ( "static.files" ) ;
320+ let mut stack = vec ! [ doc_static_dir. clone( ) ] ;
320321 while let Some ( path) = stack. pop ( ) {
321322 if path. is_dir ( ) {
322323 for entry in fs:: read_dir ( path) . unwrap ( ) {
323324 stack. push ( entry. unwrap ( ) . path ( ) ) ;
324325 }
325326 } else {
326- let rel_path = path. strip_prefix ( & doc_dir ) . unwrap ( ) ;
327+ let rel_path = path. strip_prefix ( & doc_static_dir ) . unwrap ( ) ;
327328 let target_path = static_path. join ( rel_path) ;
328329 let _ = fs:: create_dir_all ( target_path. parent ( ) . unwrap ( ) ) ;
329330 fs:: copy ( path, target_path) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments