Skip to content

Commit

Permalink
Do not call File.expand_path() with empty strings
Browse files Browse the repository at this point in the history
  • Loading branch information
cdelafuente-r7 committed Jan 7, 2022
1 parent 27ad15d commit 59de13b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/msf/core/opt_path.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def type
end

def normalize(value)
value.nil? ? value : File.expand_path(value)
value.nil? || value.to_s.empty? ? value : File.expand_path(value)
end

def validate_on_assignment?
Expand Down

0 comments on commit 59de13b

Please sign in to comment.