Skip to content

Commit

Permalink
Tidy - fix regex syntax (broken in previous commit)
Browse files Browse the repository at this point in the history
  • Loading branch information
samaaron committed Jan 14, 2025
1 parent a7f8965 commit 8e9be57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/server/ruby/lib/sonicpi/sample_loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def ls_samples(path, recursive=false)
res = @cached_folder_contents[path]
return res if res
# match wav, aiff, aif, wave, flac, mp3, ogg and oga files
pattern = '*.{[wW][aA][vV],[wW][aA][vV][eE],[aA][iI][fF],[aA][iI][fF][fF],[fF][lL][aA][cC],[mM][pP]3},[oO][gG][gGaA]'
pattern = '*.{[wW][aA][vV],[wW][aA][vV][eE],[aA][iI][fF],[aA][iI][fF][fF],[fF][lL][aA][cC],[mM][pP]3,[oO][gG][gGaA]}'
if recursive
res = Dir.chdir(path) { Dir.glob("**/#{pattern}").map { |p| File.expand_path(p) } }.sort
else
Expand Down

0 comments on commit 8e9be57

Please sign in to comment.