Check if file exists
This commit is contained in:
parent
622c9d9841
commit
3b46bb1c10
|
@ -6,6 +6,7 @@ require 'fileutils'
|
|||
def fingerprint(file_path)
|
||||
# file_path is relative to public
|
||||
public_file_path = "public/#{file_path}"
|
||||
return unless File.exists?(public_file_path)
|
||||
digest = Digest::MD5.file public_file_path
|
||||
extension = File.extname(file_path)
|
||||
basename = File.basename(file_path, extension)
|
||||
|
|
Loading…
Reference in New Issue
Block a user