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 | 74 | 'svg', 'tga', 'tif', 'tiff', 'webp' |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | −local EXTENSIONS = {} | |
| 78 | −local EXTENSIONS_VIDEO = {} | |
| 79 | −local EXTENSIONS_AUDIO = {} | |
| 80 | −local EXTENSIONS_IMAGES = {} | |
| 77 | +local EXTENSIONS | |
| 78 | +local EXTENSIONS_VIDEO | |
| 79 | +local EXTENSIONS_AUDIO | |
| 80 | +local EXTENSIONS_IMAGES | |
| 81 | 81 | |
| 82 | 82 | local function SetUnion (a,b) |
| 83 | 83 | for k in pairs(b) do a[k] = true end |
| @@ -137,6 +137,10 @@ local function split_patterns() · 53 unmodified lines | ||
| 137 | 137 | end |
| 138 | 138 | |
| 139 | 139 | local function create_extensions() |
| 140 | + EXTENSIONS = {} | |
| 141 | + EXTENSIONS_VIDEO = {} | |
| 142 | + EXTENSIONS_AUDIO = {} | |
| 143 | + EXTENSIONS_IMAGES = {} | |
| 140 | 144 | if o.videos then |
| 141 | 145 | SetUnion(SetUnion(EXTENSIONS_VIDEO, EXTENSIONS_VIDEO_DEFAULT), o.additional_video_exts) |
| 142 | 146 | SetUnion(EXTENSIONS, EXTENSIONS_VIDEO) |
| @@ -169,6 +173,9 @@ options.read_options(o, nil, function(list) · 26 unmodified lines | ||
| 169 | 173 | if list.directory_mode then |
| 170 | 174 | validate_directory_mode() |
| 171 | 175 | end |
| 176 | + if list.ignore_patterns then | |
| 177 | + split_patterns() | |
| 178 | + end | |
| 172 | 179 | end) |
| 173 | 180 | |
| 174 | 181 | split_option_exts(true, true, true) |