/*
Copyright 2015 IoT.bzh
+ author: José Bollo <jose.bollo@iot.bzh>
+
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
#define _GNU_SOURCE
#include <errno.h>
-#include <syslog.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
#include "wgt.h"
#include "wgt-info.h"
#include "secmgr-wrap.h"
+#include "utils-dir.h"
static int check_defined(const void *data, const char *name)
{
char target[PATH_MAX];
int rc;
- rc = snprintf(link, sizeof link, "%s/%s@%s", ICONDESTDIR, desc->id, desc->version);
+ create_directory(FWK_ICON_DIR, 0755, 1);
+ rc = snprintf(link, sizeof link, "%s/%s@%s", FWK_ICON_DIR, desc->id, desc->version);
if (rc >= sizeof link) {
ERROR("link to long in install_icon");
errno = EINVAL;
NOTICE("-- INSTALLING widget %s --", wgtfile);
/* workdir */
+ create_directory(root, 0755, 1);
if (make_workdir_base(root, "TMP", 0)) {
ERROR("failed to create a working directory");
goto error1;