Merge pull request #22 from spaceChRiS/import-filters-fix
Take care for code in for loop to be run even for the last image.
This commit is contained in:
@@ -50,6 +50,7 @@ dt.register_import_filter("prefer raw over jpeg", function(event, images)
|
|||||||
local current_base = ""
|
local current_base = ""
|
||||||
local jpg_indices = {}
|
local jpg_indices = {}
|
||||||
local other_format_found = false
|
local other_format_found = false
|
||||||
|
table.insert(images, "")
|
||||||
for i, img in ipairs(images) do
|
for i, img in ipairs(images) do
|
||||||
local extension = img:match("[^.]*$"):upper()
|
local extension = img:match("[^.]*$"):upper()
|
||||||
local base = img:match("^.*[.]")
|
local base = img:match("^.*[.]")
|
||||||
@@ -74,6 +75,7 @@ dt.register_import_filter("prefer raw over jpeg", function(event, images)
|
|||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
table.remove(images)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- vim: shiftwidth=2 expandtab tabstop=2 cindent
|
-- vim: shiftwidth=2 expandtab tabstop=2 cindent
|
||||||
|
|||||||
Reference in New Issue
Block a user