@@ -1401,7 +1401,7 @@ def _get_scan_data(self, location):
14011401 - a JSON string
14021402 - a Python mapping
14031403
1404- or `location` is a List that contains multiple paths to scans that are to be joined together.
1404+ or `location` is a List or a Tuple that contains multiple paths to scans that are to be joined together.
14051405 """
14061406 if isinstance (location , dict ):
14071407 return location
@@ -1411,6 +1411,7 @@ def _get_scan_data(self, location):
14111411 scan_data = self ._get_scan_data_helper (loc )
14121412 combined_scan_data ['headers' ].extend (scan_data ['headers' ])
14131413 combined_scan_data ['files' ].extend (scan_data ['files' ])
1414+ combined_scan_data ['headers' ] = sorted (combined_scan_data ['headers' ], key = lambda x : x ['start_timestamp' ])
14141415 return combined_scan_data
14151416 return self ._get_scan_data_helper (location )
14161417
@@ -1544,6 +1545,7 @@ def _populate(self, scan_data):
15441545 # Create root resource without setting root data just yet. If we run into the root data
15451546 # while we iterate through `resources_data`, we fill in the data then.
15461547
1548+ # Create a virtual root if we are merging multiple scans together
15471549 multiple_input = isinstance (self .location , (list , tuple ,)) and len (self .location ) > 1
15481550 if multiple_input :
15491551 root_path = 'virtual_root'
@@ -1562,6 +1564,7 @@ def _populate(self, scan_data):
15621564
15631565 for resource_data in resources_data :
15641566 path = resource_data .get ('path' )
1567+ # Append virtual_root path to imported Resource path if we are merging multiple scans
15651568 if multiple_input :
15661569 path = os .path .join (root_path , path )
15671570 name = resource_data .get ('name' , None )
0 commit comments