#82: updated regexp
This commit is contained in:
parent
ecfde4ad21
commit
9eaf62666b
|
@ -66,9 +66,9 @@ class PlatformContent
|
|||
# ---------------------
|
||||
|
||||
def self.find_by_platform(platform, path, term)
|
||||
term = (term.present? && term =~ /\w/) ? term : ''
|
||||
term = (term.present? && term =~ /^[\w]+$/) ? term : ''
|
||||
path = path.split(File::SEPARATOR)
|
||||
.select{ |p| p.present? && p =~ /\w/ }
|
||||
.select{ |p| p.present? && p =~ /^[\w]+$/ }
|
||||
.join(File::SEPARATOR)
|
||||
results = Dir.glob(File.join(platform.path, path, "*#{term}*"))
|
||||
if term
|
||||
|
|
Loading…
Reference in New Issue