The extensions list needs to be cleared in this case. Also, add the missing split_patterns().
Unified · Split
| @@ -74,10 +74,10 @@ local EXTENSIONS_IMAGES_DEFAULT = Set { · 73 unmodified lines | |||
| 74 | 'svg', 'tga', 'tif', 'tiff', 'webp' | 74 | 'svg', 'tga', 'tif', 'tiff', 'webp' |
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | local EXTENSIONS = {} | 77 | local EXTENSIONS |
| 78 | local EXTENSIONS_VIDEO = {} | 78 | local EXTENSIONS_VIDEO |
| 79 | local EXTENSIONS_AUDIO = {} | 79 | local EXTENSIONS_AUDIO |
| 80 | local EXTENSIONS_IMAGES = {} | 80 | local EXTENSIONS_IMAGES |
| 81 | 81 | ||
| 82 | local function SetUnion (a,b) | 82 | local function SetUnion (a,b) |
| 83 | for k in pairs(b) do a[k] = true end | 83 | for k in pairs(b) do a[k] = true end |
| @@ -137,6 +137,10 @@ local function split_patterns() · 53 unmodified lines | |||
| 137 | end | 137 | end |
| 138 | 138 | ||
| 139 | local function create_extensions() | 139 | local function create_extensions() |
| 140 | EXTENSIONS = {} | ||
| 141 | EXTENSIONS_VIDEO = {} | ||
| 142 | EXTENSIONS_AUDIO = {} | ||
| 143 | EXTENSIONS_IMAGES = {} | ||
| 140 | if o.videos then | 144 | if o.videos then |
| 141 | SetUnion(SetUnion(EXTENSIONS_VIDEO, EXTENSIONS_VIDEO_DEFAULT), o.additional_video_exts) | 145 | SetUnion(SetUnion(EXTENSIONS_VIDEO, EXTENSIONS_VIDEO_DEFAULT), o.additional_video_exts) |
| 142 | SetUnion(EXTENSIONS, EXTENSIONS_VIDEO) | 146 | SetUnion(EXTENSIONS, EXTENSIONS_VIDEO) |
| @@ -169,6 +173,9 @@ options.read_options(o, nil, function(list) · 26 unmodified lines | |||
| 169 | if list.directory_mode then | 173 | if list.directory_mode then |
| 170 | validate_directory_mode() | 174 | validate_directory_mode() |
| 171 | end | 175 | end |
| 176 | if list.ignore_patterns then | ||
| 177 | split_patterns() | ||
| 178 | end | ||
| 172 | end) | 179 | end) |
| 173 | 180 | ||
| 174 | split_option_exts(true, true, true) | 181 | split_option_exts(true, true, true) |