On Tuesday 19 October 2010 19:20, Gilles Espinasse wrote:
>
> ----- Original Message -----
> From: "Lukas Huba" <[email protected]>
> To: <[email protected]>
> Sent: Tuesday, October 19, 2010 6:43 PM
> Subject: [PATCH] Diff: Make sure we handle empty files properly
>
> Suggested rewording of the comment and help texts
Looks ok. I only propose a bit different code which truncates the file:
// File is empty after the patches have
been applied
state = 0;
if (option_mask32 & FLAG_RMEMPTY) {
// If flag -E or
--remove-empty-files is set
printf("removing %s\n", name);
xunlink(name);
} else {
printf("patching file %s\n",
name);
xclose(xopen(name, O_WRONLY |
O_TRUNC));
}
Applied, thanks! Please try current git.
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox