Skip to content

Commit 045f0ba

Browse files
committed
fix: database time not preserved during file copy
1 parent e966594 commit 045f0ba

File tree

3 files changed

+3
-30
lines changed

3 files changed

+3
-30
lines changed

cve_bin_tool/cvedb.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -796,9 +796,9 @@ def copy_db(self, filename, export=True):
796796
"""Copy database file to or from new path."""
797797
self.db_close()
798798
if export:
799-
shutil.copy(self.dbpath, filename)
799+
shutil.copy2(self.dbpath, filename)
800800
else:
801-
shutil.copy(filename, self.dbpath)
801+
shutil.copy2(filename, self.dbpath)
802802

803803
def remove_cache_backup(self) -> None:
804804
"""Removes the backup if database was successfully loaded."""

report.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[]

requirements.csv

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)