Do not call File.expand_path() with empty strings

This commit is contained in:
Christophe De La Fuente 2022-01-07 13:09:47 +01:00
parent 27ad15d040
commit 59de13be43
No known key found for this signature in database
GPG Key ID: 9E350956EA00352A
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ class OptPath < OptBase
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?