mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:51:18 +08:00
DEV: Prefer \A and \z over ^ and $ in regexes (#19936)
This commit is contained in:

committed by
GitHub

parent
f7907a3645
commit
666536cbd1
@ -38,7 +38,7 @@ module Compression
|
||||
|
||||
def build_entry_path(dest_path, _, compressed_file_path)
|
||||
basename = File.basename(compressed_file_path)
|
||||
basename.gsub!(/#{Regexp.escape(extension)}$/, "")
|
||||
basename.gsub!(/#{Regexp.escape(extension)}\z/, "")
|
||||
File.join(dest_path, basename)
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user