File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 66import os
77from concurrent .futures import ProcessPoolExecutor
88from itertools import repeat
9- from shutil import copyfileobj
109from typing import TYPE_CHECKING
1110
1211import numpy as np
2120from mdio .core .indexing import ChunkIterator
2221from mdio .segy ._workers import trace_worker
2322from mdio .segy .creation import SegyPartRecord
23+ from mdio .segy .creation import concat_files
2424from mdio .segy .creation import serialize_to_segy_stack
2525from mdio .segy .utilities import find_trailing_ones_index
2626
@@ -249,11 +249,7 @@ def segy_record_concat(
249249 dest_map [record_file_path ].append (block .path )
250250
251251 for dest_path , source_paths in dest_map .items ():
252- with open (dest_path , "wb" ) as dest_file :
253- for src_path in source_paths :
254- with open (src_path , "rb" ) as src_file :
255- copyfileobj (src_file , dest_file )
256- os .remove (src_path )
252+ concat_files ([dest_path ] + source_paths )
257253
258254 return records_metadata
259255
You can’t perform that action at this time.
0 commit comments