File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -50,11 +50,10 @@ async fn create_module_path(
5050 output_folder : & Path ,
5151) -> PathBuf {
5252 let cleaned_specifier = strip_file_scheme ( global_specifier) ;
53- let cleaned_specifier =
54- cleaned_specifier. replace ( entry_path. to_str ( ) . unwrap ( ) , "" ) ;
55- let module_path = PathBuf :: from ( cleaned_specifier) ;
53+ let cleaned_path =
54+ pathdiff:: diff_paths ( & * cleaned_specifier, entry_path) . unwrap ( ) ;
5655
57- if let Some ( parent) = module_path . parent ( ) {
56+ if let Some ( parent) = cleaned_path . parent ( ) {
5857 if parent. parent ( ) . is_some ( ) {
5958 let output_folder_and_mod_folder = output_folder. join (
6059 parent
@@ -68,9 +67,9 @@ async fn create_module_path(
6867 }
6968
7069 output_folder. join (
71- module_path
70+ cleaned_path
7271 . strip_prefix ( "/" )
73- . unwrap_or_else ( |_| ensure_unix_relative_path ( & module_path ) ) ,
72+ . unwrap_or_else ( |_| ensure_unix_relative_path ( & cleaned_path ) ) ,
7473 )
7574}
7675
You can’t perform that action at this time.
0 commit comments