squish.lua: AutoFetch file paths can now begin with / or . too

Tue, 30 Nov 2010 13:22:35 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Tue, 30 Nov 2010 13:22:35 +0000
changeset 82
4d6a976c3bb7
parent 81
44f2945d09cf
child 83
ff14c066a643

squish.lua: AutoFetch file paths can now begin with / or . too

squish.lua file | annotate | diff | comparison | revisions
--- a/squish.lua	Tue Nov 30 13:18:47 2010 +0000
+++ b/squish.lua	Tue Nov 30 13:22:35 2010 +0000
@@ -229,7 +229,7 @@
 		print_debug("Fetching: ".. url)
 		if url:match("^https?://") then
 			data, err = fetch.http(url);
-		elseif url:match("^file://") then
+		elseif url:match("^file://") or url:match("^[/%.]") then
 			local dataf, dataerr = io.open((url:gsub("^file://", "")));
 			if dataf then
 				data, err = dataf:read("*a");

mercurial