Code Review
/
src
/
app-framework-main.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Enforce numeric application IDs
[src/app-framework-main.git]
/
src
/
wgtpkg-pack.c
diff --git
a/src/wgtpkg-pack.c
b/src/wgtpkg-pack.c
index
80ad87a
..
53ab9dc
100644
(file)
--- a/
src/wgtpkg-pack.c
+++ b/
src/wgtpkg-pack.c
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2015-201
8
IoT.bzh
+ Copyright (C) 2015-201
9
IoT.bzh
author: José Bollo <jose.bollo@iot.bzh>
author: José Bollo <jose.bollo@iot.bzh>
@@
-40,7
+40,7
@@
static void version()
"\n"
" %s version="AFM_VERSION"\n"
"\n"
"\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",
" 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) {
/* 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 */
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;
return 1;