@@ -43,15 +43,15 @@ def get_config_options(bv: BinaryView):
43
43
dependency_name = bn .TextLineField ("Dependency Name (optional):" )
44
44
bn .get_form_input ([lib_name , alternate_names , export_path , dependency_name ], "Export as Type Library Options" )
45
45
46
- config = {"lib_name" : lib_name .result , "alternate_names" : alternate_names .result , "export_path" : export_path .result ,
46
+ config = {"lib_name" : lib_name .result , "alternate_names" : alternate_names .result , "export_path" : os . path . expanduser ( export_path .result ) ,
47
47
"dependency_name" : dependency_name .result }
48
48
return config
49
49
50
50
51
51
def export_functions (bv : BinaryView ):
52
52
log = bv .create_logger ("TypeLib_Exporter" )
53
53
config = get_config_options (bv )
54
- if not os .path .exists (os .path .dirname (os . path . expanduser ( config ['export_path' ]) )):
54
+ if not os .path .exists (os .path .dirname (config ['export_path' ])):
55
55
log .log_error (f"Please specify a path to export the type library: { config ['export_path' ]} " )
56
56
return
57
57
if len (config ["lib_name" ]) == 0 :
@@ -69,4 +69,4 @@ def export_functions(bv: BinaryView):
69
69
typelib = create_type_library (log , bv , export_funcs , config )
70
70
typelib .finalize ()
71
71
log .log_info (f"Exported { len (export_funcs )} functions to { config ['export_path' ]} " )
72
- typelib .write_to_file (os . path . expanduser ( config ['export_path' ]) )
72
+ typelib .write_to_file (config ['export_path' ])
0 commit comments