diff options
| author | Hisham Muhammad <hisham@gobolinux.org> | 2013-04-29 11:09:22 -0300 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2013-04-29 11:09:46 -0300 |
| commit | f0772ba0521cc4673e9e4750e9147ef7b54fba1b (patch) | |
| tree | 32840b1b103a13d33b572e192619c88f402399fd /src | |
| parent | 800c2fe268481d6dc60f95005032a72d8cbe82db (diff) | |
| download | luarocks-f0772ba0521cc4673e9e4750e9147ef7b54fba1b.tar.gz luarocks-f0772ba0521cc4673e9e4750e9147ef7b54fba1b.tar.bz2 luarocks-f0772ba0521cc4673e9e4750e9147ef7b54fba1b.zip | |
Fixes to the patch feature, contributed by Philipp Janda
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 |
