From ba6821ea996d862f66757cb988b4941fb7cc4810 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Mon, 29 Apr 2013 15:21:43 -0300 Subject: Improve patch compatibility, as suggested by Philipp Janda --- src/luarocks/tools/patch.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/luarocks/tools/patch.lua b/src/luarocks/tools/patch.lua index db1a9de5..04154219 100644 --- a/src/luarocks/tools/patch.lua +++ b/src/luarocks/tools/patch.lua @@ -295,7 +295,7 @@ function read_patch(filename, data) -- Accept a space as a terminator, like GNU patch does. -- Breaks patches containing filenames with spaces... -- FIXME Figure out what does GNU patch do in those cases. - local match = line:match("^%-%-%- ([^\t ]+)") + local match = line:match("^%-%-%- ([^ \t\r\n]+)") if not match then all_ok = false warning(format("skipping invalid filename at line %d", lineno+1)) -- cgit v1.2.3-55-g6feb