Skip to content

Commit 542f869

Browse files
authored
fix: database time not preserved during file copy (#5301)
* closes #5285
1 parent d3fb944 commit 542f869

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
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."""

0 commit comments

Comments
 (0)