diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/tools/patch.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/luarocks/tools/patch.lua b/src/luarocks/tools/patch.lua index 9a89aa48..db1a9de5 100644 --- a/src/luarocks/tools/patch.lua +++ b/src/luarocks/tools/patch.lua | |||
@@ -295,7 +295,7 @@ function read_patch(filename, data) | |||
295 | -- Accept a space as a terminator, like GNU patch does. | 295 | -- Accept a space as a terminator, like GNU patch does. |
296 | -- Breaks patches containing filenames with spaces... | 296 | -- Breaks patches containing filenames with spaces... |
297 | -- FIXME Figure out what does GNU patch do in those cases. | 297 | -- FIXME Figure out what does GNU patch do in those cases. |
298 | local match = line:match("^--- ([^\t ]+)") | 298 | local match = line:match("^%-%-%- ([^\t ]+)") |
299 | if not match then | 299 | if not match then |
300 | all_ok = false | 300 | all_ok = false |
301 | warning(format("skipping invalid filename at line %d", lineno+1)) | 301 | warning(format("skipping invalid filename at line %d", lineno+1)) |
@@ -329,7 +329,7 @@ function read_patch(filename, data) | |||
329 | -- Accept a space as a terminator, like GNU patch does. | 329 | -- Accept a space as a terminator, like GNU patch does. |
330 | -- Breaks patches containing filenames with spaces... | 330 | -- Breaks patches containing filenames with spaces... |
331 | -- FIXME Figure out what does GNU patch do in those cases. | 331 | -- FIXME Figure out what does GNU patch do in those cases. |
332 | local re_filename = "^%+%+%+ ([^ \t]+)" | 332 | local re_filename = "^%+%+%+ ([^ \t\r\n]+)" |
333 | local match = line:match(re_filename) | 333 | local match = line:match(re_filename) |
334 | if not match then | 334 | if not match then |
335 | all_ok = false | 335 | all_ok = false |