/*
- Copyright (C) 2015-2018 IoT.bzh
+ Copyright (C) 2015-2020 IoT.bzh
author: José Bollo <jose.bollo@iot.bzh>
"\n"
" %s version="AFM_VERSION"\n"
"\n"
- " Copyright (C) 2015, 2016, 2017 \"IoT.bzh\"\n"
+ " Copyright (C) 2015-2020 \"IoT.bzh\"\n"
" AFB comes with ABSOLUTELY NO WARRANTY.\n"
" Licence Apache 2\n"
"\n",
/* compute absolutes paths */
x = realpath(wgtfile, NULL);
if (x == NULL) {
- ERROR("realpath failed for %s",wgtfile);
+ ERROR("realpath failed for %s", wgtfile);
return 1;
}
wgtfile = x;
/* set and enter the workdir */
- if (set_workdir(directory, 0))
+ if (chdir(directory)) {
+ ERROR("failed to enter directory %s", directory);
+ return 1;
+ }
+ if (set_workdir(".", 0))
return 1;