@@ -306,8 +306,8 @@ def create(
306306 It only takes two binaries.
307307
308308 :param filename: database file path
309- :param primary: path to primary binary
310- :param secondary: path to secondary binary
309+ :param primary: path to primary export file
310+ :param secondary: path to secondary export file
311311 :param version: version of the differ used
312312 :param desc: description of the database
313313 :param similarity: similarity score between to two binaries
@@ -325,15 +325,15 @@ def create(
325325 hash1 = hashlib .sha256 (file1 .read_bytes ()).hexdigest () if file1 .exists () else ""
326326 conn .execute (
327327 """INSERT INTO file (filename, exefilename, hash) VALUES (:filename, :name, :hash)""" ,
328- {"filename" : str (file1 ), "name" : file1 .name , "hash" : hash1 },
328+ {"filename" : str (file1 . with_suffix ( "" ). name ), "name" : file1 .name , "hash" : hash1 },
329329 )
330330
331331 # Save secondary
332332 file2 = Path (secondary )
333333 hash2 = hashlib .sha256 (file2 .read_bytes ()).hexdigest () if file2 .exists () else ""
334334 conn .execute (
335335 """INSERT INTO file (filename, exefilename, hash) VALUES (:filename, :name, :hash)""" ,
336- {"filename" : str (file2 ), "name" : file2 .name , "hash" : hash2 },
336+ {"filename" : str (file2 . with_suffix ( "" ). name ), "name" : file2 .name , "hash" : hash2 },
337337 )
338338
339339 conn .execute (
0 commit comments