main: Only process .scs files in directories

Wed, 12 Sep 2018 10:56:51 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Wed, 12 Sep 2018 10:56:51 +0100
changeset 144
f7e8b865873f
parent 143
28b92d201120
child 145
df4faaa2d36f

main: Only process .scs files in directories

main.lua file | annotate | diff | comparison | revisions
--- a/main.lua	Tue Sep 11 23:51:37 2018 +0100
+++ b/main.lua	Wed Sep 12 10:56:51 2018 +0100
@@ -92,7 +92,7 @@
 			end
 			local path = assert(get_value(), "path expected for '-d'"):gsub("/*$", "");
 			for f in lfs.dir(path) do
-				if f:sub(1,1) ~= "." then
+				if f:sub(1,1) ~= "." and f:sub(-4) == ".scs" then
 					table.insert(files, path.."/"..f);
 				end
 			end

mercurial