Skip to content

fix: database time not preserved during file copy #5285

@anthonyharrison

Description

@anthonyharrison

Description

When using the --import option, the date of the database is the time the file is copied and does not prteseve the time when the file was created

To reproduce

cve-bin-tool --import <DB_FILE>

Then run a scan. Database time is reported as the time of the import and not the time that the exported data was created.

Expected behaviour:

Database time is preserved

Actual behaviour:

Database time is updated to time of cope

Version/platform info

Python 3.10 Linux (Debian 12)

Anything else?

File attribute can be preserved by using shutil.copy2 instead of shutil.copy

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions