Skip to content

Commit

Permalink
Refactor file handling to simplify and ensure accuracy
Browse files Browse the repository at this point in the history
Change the handling of the file list to directly assign a flattened array to actual_files, removing unnecessary file selection and debugging logic. This modification aligns with the intention that 'files' should strictly be the expected collection of file paths, and simplifies the code by removing redundant checks and debug outputs that are assumed to be for debugging purposes only.
  • Loading branch information
shinokaro committed Jun 20, 2024
1 parent f808836 commit 10169cc
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions bin/ocran
Original file line number Diff line number Diff line change
Expand Up @@ -502,12 +502,7 @@ EOF
end
end

files.flatten!
actual_files = files.select { |file| file.file? }

(files - actual_files).each do |missing_file|
Ocran.warn "#{missing_file} was not found"
end
actual_files = files.flatten

Ocran.msg "\t#{actual_files.size} files, #{actual_files.sum(0, &:size)} bytes"

Expand Down

0 comments on commit 10169cc

Please sign in to comment.