windows no chown on log file generation

https://github.com/warmcat/libwebsockets/issues/524

Signed-off-by: Andy Green <andy@warmcat.com>
This commit is contained in:
Andy Green 2016-05-11 18:59:27 +08:00
parent 5e203f78e2
commit 03e628b9a6

View file

@ -448,11 +448,13 @@ lws_create_vhost(struct lws_context *context,
info->log_filepath);
goto bail;
}
#ifndef WIN32
if (context->uid != -1)
if (chown(info->log_filepath, context->uid,
context->gid) == -1)
lwsl_err("unable to chown log file %s\n",
info->log_filepath);
#endif
} else
vh->log_fd = LWS_INVALID_FILE;
#endif