X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=src%2Fapp-framework-main.git;a=blobdiff_plain;f=src%2Fwgtpkg-pack.c;h=5a81d7e224fcf0814a4a60c68a6ac30dc58a7101;hp=80ad87a9d19d79a8d11f1ba01fa98237c858f5c3;hb=d0cb2a7a1e068a38b4a0c3216ccdbce0e33ecffb;hpb=48e894bee732315d89eb5b46d2432ed45fc81a43 diff --git a/src/wgtpkg-pack.c b/src/wgtpkg-pack.c index 80ad87a..5a81d7e 100644 --- a/src/wgtpkg-pack.c +++ b/src/wgtpkg-pack.c @@ -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;