File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
ricecooker/utils/pipeline Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -252,6 +252,12 @@ def execute(
252252
253253 file_metadata .path = path
254254
255+ # Ensure the file was actually processed and is in storage
256+ if not path .startswith (os .path .abspath (config .STORAGE_DIRECTORY )):
257+ raise InvalidFileException (
258+ f"File handler failed to process { original_path } - result not in storage"
259+ )
260+
255261 self ._output_path = None
256262
257263 file_metadata_list .append (file_metadata )
Original file line number Diff line number Diff line change @@ -434,7 +434,4 @@ def execute(
434434 # The download stage is special, as we expect it to always return a file
435435 # if it does not, we raise an exception to prevent further processing
436436 raise InvalidFileException (f"No file could be downloaded from { path } " )
437- for metadata in metadata_list :
438- if metadata .path == path :
439- raise InvalidFileException (f"{ path } failed to transfer" )
440437 return metadata_list
You can’t perform that action at this time.
0 commit comments