Skip to content

Commit

Permalink
don't try to delete epub files that don't exist
Browse files Browse the repository at this point in the history
closes #LA-946

Change-Id: Ic19c5bbbf930b9a4877079f0297adbfeee1ec88d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/234801
Tested-by: Service Cloud Jenkins <[email protected]>
QA-Review: James Williams <[email protected]>
Product-Review: James Williams <[email protected]>
Reviewed-by: Jeremy Stanley <[email protected]>
  • Loading branch information
maneframe committed Apr 24, 2020
1 parent 060f282 commit 113ef53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cc/exporter/web_zip/zip_package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def add_files
def filter_and_clean_files(files)
export_files = filter_for_export_safe_items(files, :attachments)
cleanup_files = files - export_files
cleanup_files.each {|file_data| File.delete(file_data[:path_to_file])}
cleanup_files.each {|file_data| file_data[:exists] && File.delete(file_data[:path_to_file])}
export_files
end

Expand Down

0 comments on commit 113ef53

Please sign in to comment.