Diff between f791fe4eb686c14b66985b7cc3aa351c2cc90752 and b0a98c3d27200acf67e248b53ee664472bb2a8c0
Changed Files
| File | Additions | Deletions | Status |
| obexd/src/main.c | +8 | -0 | modified |
Full Patch
diff --git a/obexd/src/main.c b/obexd/src/main.c
index f16be8b..d733cb4 100644
--- a/obexd/src/main.c
+++ b/obexd/src/main.c
@@ -366,6 +366,14 @@ int main(int argc, char *argv[])
if (option_root == NULL)
option_root = g_strdup(DEFAULT_ROOT_PATH);
+ if (option_root[0] != '/') {
+ char *old_root = option_root, *home = getenv("HOME");
+ if (home) {
+ option_root = g_strdup_printf("%s/%s", home, old_root);
+ g_free(old_root);
+ }
+ }
+
if (option_capability == NULL)
option_capability = g_strdup(DEFAULT_CAP_FILE);