Oops, sorry. Here coms the patch.
On 8/5/07, Denis Vlasenko <[EMAIL PROTECTED]> wrote:
> On Friday 03 August 2007 22:58, Nguyen Thai Ngoc Duy wrote:
> > It is also documented in the comment above the function but not implemented
>
> No patch is attached to your mail...
> --
> vda
>
--
Duy
diff --git a/box/editors/patch.c b/box/editors/patch.c
index 5f7f7d0..544dfbc 100644
--- a/box/editors/patch.c
+++ b/box/editors/patch.c
@@ -58,6 +58,13 @@ static char *extract_filename(char *line, int patch_level)
temp = strchr(filename_start_ptr, '\t');
if (temp) *temp = 0;
+ if (patch_level == -1) {
+ temp = strrchr(filename_start_ptr, '/');
+ if (temp)
+ filename_start_ptr = temp + 1;
+ return xstrdup(filename_start_ptr);
+ }
+
/* skip over (patch_level) number of leading directories */
for (i = 0; i < patch_level; i++) {
temp = strchr(filename_start_ptr, '/');
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox