Skip to content

Commit

Permalink
changed .. to __PARENT__
Browse files Browse the repository at this point in the history
  • Loading branch information
coder6583 committed Apr 22, 2024
1 parent c83a7f0 commit 3a2aa67
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/archive.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,8 @@ def self.sanitize_directories(files)
files.each do |file|

# edge case for removing "./" from pathnames
# file[:pathname] = file[:pathname].gsub(/\.\.\//) {'..-'}
if file[:pathname].include?("./")
file[:pathname] = file[:pathname].split("./").last
file[:pathname] = File.cleanpath(file[:pathname], rel_root = true).gsub("..", "__PARENT__")
end

if(file[:directory])
Expand Down

0 comments on commit 3a2aa67

Please sign in to comment.