File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -170,22 +170,26 @@ impl<'a> Dumper<'a> {
170170 . map ( |s| urlencoding:: encode ( & s) . into_owned ( ) )
171171 . join ( ":" ) ;
172172 s. truncate (
173- ( 0 ..FILENAME_PREFIX_MAX_LENGTH )
173+ ( 0 ..( FILENAME_PREFIX_MAX_LENGTH - source_op . name . as_str ( ) . len ( ) ) )
174174 . rev ( )
175175 . find ( |i| s. is_char_boundary ( * i) )
176176 . unwrap_or ( 0 ) ,
177177 ) ;
178178 keys_by_filename_prefix. entry ( s) . or_default ( ) . push ( key) ;
179179 }
180180
181+ let mut file_path_base =
182+ PathBuf :: from ( & self . options . output_dir ) . join ( source_op. name . as_str ( ) ) ;
183+ file_path_base. push ( ":" ) ;
181184 let evaluate_futs =
182185 keys_by_filename_prefix
183186 . into_iter ( )
184187 . flat_map ( |( filename_prefix, keys) | {
185188 let num_keys = keys. len ( ) ;
189+ let file_path_base = & file_path_base;
186190 keys. into_iter ( ) . enumerate ( ) . map ( move |( i, key) | {
187- let mut file_path =
188- Path :: new ( & self . options . output_dir ) . join ( Path :: new ( & filename_prefix) ) ;
191+ let mut file_path = file_path_base . clone ( ) ;
192+ file_path . push ( & filename_prefix) ;
189193 if num_keys > 1 {
190194 file_path. push ( format ! ( ".{}" , i) ) ;
191195 }
You can’t perform that action at this time.
0 commit comments