@@ -98,23 +98,18 @@ bundle_executable_path (const char* executable, const char* bundle_path, const c
9898}
9999
100100static bool
101- external_assembly_probe (const char * name , void * * data , int64_t * size )
101+ external_assembly_probe (const char * relative_assembly_path , void * * data , int64_t * size )
102102{
103103 if (g_mapped_files_count >= MAX_MAPPED_COUNT )
104104 {
105- LOG_ERROR ("Too many mapped files, cannot map %s" , name );
105+ LOG_ERROR ("Too many mapped files, cannot map %s" , relative_assembly_path );
106106 return false;
107107 }
108108
109- // Get just the file name
110- const char * pos = strrchr (name , '/' );
111- if (pos != NULL )
112- name = pos + 1 ;
113-
114109 // Look in the bundle path where the files were extracted
115110 char full_path [1024 ];
116- size_t path_len = strlen (g_bundle_path ) + strlen (name ) + 1 ; // +1 for '/'
117- size_t res = snprintf (full_path , path_len + 1 , "%s/%s" , g_bundle_path , name );
111+ size_t path_len = strlen (g_bundle_path ) + strlen (relative_assembly_path ) + 1 ; // +1 for '/'
112+ size_t res = snprintf (full_path , path_len + 1 , "%s/%s" , g_bundle_path , relative_assembly_path );
118113 if (res < 0 || res != path_len )
119114 return false;
120115
@@ -137,7 +132,7 @@ external_assembly_probe(const char* name, void** data, int64_t* size)
137132 return false;
138133 }
139134
140- LOG_INFO ("Mapped %s -> %s" , name , full_path );
135+ LOG_INFO ("Mapped %s -> %s" , relative_assembly_path , full_path );
141136 g_mapped_files [g_mapped_files_count ] = mapped ;
142137 g_mapped_file_sizes [g_mapped_files_count ] = size_local ;
143138 g_mapped_files_count ++ ;
0 commit comments