Skip to content
Snippets Groups Projects
Commit 2c9fbc13 authored by Chris Lamb's avatar Chris Lamb :eyes:
Browse files

Correct the matching of R .rds files by also detecting newer versions of this file format.

parent f06c44f4
No related branches found
No related tags found
No related merge requests found
Pipeline #82645 passed
...@@ -30,7 +30,10 @@ import logging ...@@ -30,7 +30,10 @@ import logging
import binascii import binascii
HEADER = binascii.a2b_hex("580a000000020003") RDS_HEADERS = {
binascii.a2b_hex("580a000000020003"),
binascii.a2b_hex("580a000000030003"),
}
DUMP_RDB = rb""" DUMP_RDB = rb"""
hideOutput = lazyLoad(commandArgs(TRUE)); hideOutput = lazyLoad(commandArgs(TRUE));
...@@ -128,7 +131,7 @@ class RdsFile(File): ...@@ -128,7 +131,7 @@ class RdsFile(File):
or file.container or file.container
and check_rds_extension(file.container.source) and check_rds_extension(file.container.source)
): ):
return file.file_header.startswith(HEADER) return file.file_header[:8] in RDS_HEADERS
return False return False
def compare_details(self, other, source=None): def compare_details(self, other, source=None):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment