X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fwgtpkg-pack.c;h=53ab9dc73257d5d0fa1b4bdcabcfe4ae241b1ad6;hb=7553044c59814c33763bb4b1c34664dceed68735;hp=0f5f70c0ecbad9098fe87ce60078d511ac26925e;hpb=2bbe66dda7fadf2d08a57e2b0e0fa8841a118c81;p=src%2Fapp-framework-main.git diff --git a/src/wgtpkg-pack.c b/src/wgtpkg-pack.c index 0f5f70c..53ab9dc 100644 --- a/src/wgtpkg-pack.c +++ b/src/wgtpkg-pack.c @@ -1,5 +1,5 @@ /* - Copyright 2015, 2016, 2017 IoT.bzh + Copyright (C) 2015-2019 IoT.bzh author: José Bollo @@ -40,7 +40,7 @@ static void version() "\n" " %s version="AFM_VERSION"\n" "\n" - " Copyright (C) 2015, 2016, 2017 \"IoT.bzh\"\n" + " Copyright (C) 2015-2019 \"IoT.bzh\"\n" " AFB comes with ABSOLUTELY NO WARRANTY.\n" " Licence Apache 2\n" "\n", @@ -161,13 +161,17 @@ int main(int ac, char **av) /* 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;