Skip to content

Commit

Permalink
add test zipfile and log
Browse files Browse the repository at this point in the history
  • Loading branch information
yzhoubk committed Dec 19, 2023
1 parent 68642b6 commit 953c80c
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/gingr/data_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ def extract_zipfile(zip_file, to_dir_path)
end
end
extracted_to_path
rescue Exception => e
Logging.logger.error("Failed to extract #{zip_file}: #{e.message}")
raise
end

def move_files(from_dir_path)
Expand Down Expand Up @@ -61,7 +64,7 @@ def clr_subdirectory(zip_file, to_dir_path)
FileUtils.rm_r(subdir_path) if File.directory? subdir_path
subdir_path
rescue Errno::EACCES
logger.error("Permission denied: #{subdir_path}")
Logging.logger.error("Permission denied: #{subdir_path}")
raise
end

Expand Down
Binary file removed spec/fixture/zipfile/test-public_restricted.zip
Binary file not shown.
Binary file removed spec/fixture/zipfile/test_public.zip
Binary file not shown.
Binary file added spec/fixture/zipfile/vector_public.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 953c80c

Please sign in to comment.