kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 512e305e20ce6bd867d3023d510f2d2e517d9a95
parent 81d119ff93067385ac0ca975a55ea343dfd3ae8d
Author: Joris Vink <joris@coders.se>
Date:   Thu, 11 Jun 2015 19:33:30 +0200

When building assets, skip empty files.

Diffstat:
src/cli.c | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/cli.c b/src/cli.c @@ -601,6 +601,12 @@ cli_build_asset(char *fpath, struct dirent *dp) if (stat(fpath, &st) == -1) cli_fatal("stat: %s %s", fpath, errno_s); + /* If this file was empty, skip it. */ + if (st.st_size == 0) { + printf("skipping empty asset %s\n", name); + return; + } + (void)cli_vasprintf(&opath, "%s/.objs/%s.o", rootdir, name); (void)cli_vasprintf(&cpath, "%s/.objs/%s.c", rootdir, name);