projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
0f7b8c9
)
Copied the -h logic from setup.c to sendcommand.c
author
Art Cancro
<ajc@uncensored.citadel.org>
Fri, 20 Jan 2012 19:33:39 +0000
(14:33 -0500)
committer
Art Cancro
<ajc@uncensored.citadel.org>
Fri, 20 Jan 2012 19:33:39 +0000
(14:33 -0500)
citadel/utils/sendcommand.c
patch
|
blob
|
history
diff --git
a/citadel/utils/sendcommand.c
b/citadel/utils/sendcommand.c
index fde3d5c3c5dff8e39aee0fe6ca9f086e5c32b8a5..bef37c7be7dccc6e51b422e9828e808c11d3fdac 100644
(file)
--- a/
citadel/utils/sendcommand.c
+++ b/
citadel/utils/sendcommand.c
@@
-153,7
+153,13
@@
int main(int argc, char **argv)
while ((a = getopt(argc, argv, "h:w:")) != EOF) {
switch (a) {
case 'h':
- strcpy(relhome, optarg);
+ relh=optarg[0]!='/';
+ if (!relh) {
+ strncpy(ctdl_home_directory, optarg, sizeof ctdl_home_directory);
+ } else {
+ strncpy(relhome, optarg, sizeof relhome);
+ }
+ home = 1;
break;
case 'w':
watchdog = atoi(optarg);