mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-28 00:29:21 +00:00
tester.c: fix resource directory path
This commit is contained in:
parent
d638129f62
commit
d1907a0d48
2 changed files with 7 additions and 7 deletions
|
|
@ -1 +1 @@
|
|||
Subproject commit 93cf916ac44dea93db7744b1d66ea3655c8345d9
|
||||
Subproject commit e9b2d8d4e1ce790f72b1c02c3d3242651f22672d
|
||||
|
|
@ -196,12 +196,12 @@ int main (int argc, char *argv[])
|
|||
|
||||
liblinphone_tester_init(NULL);
|
||||
|
||||
if (strstr(argv[0], ".libs") && argv[0][0] == '/') {
|
||||
char res_dir[128] = {0};
|
||||
// this allows to launch liblinphone_tester from outside of tester directory
|
||||
strncpy(res_dir, argv[0], strstr(argv[0], ".libs")-argv[0]);
|
||||
bc_tester_set_resource_dir_prefix(res_dir);
|
||||
bc_tester_set_writable_dir_prefix(res_dir);
|
||||
// this allows to launch liblinphone_tester from outside of tester directory
|
||||
if (strstr(argv[0], ".libs")) {
|
||||
char* prefix = ms_strdup_printf("%s%s", argv[0][0]=='/'?"":"./", strstr(argv[0], ".libs"));
|
||||
bc_tester_set_resource_dir_prefix(prefix);
|
||||
bc_tester_set_writable_dir_prefix(prefix);
|
||||
ms_free(prefix);
|
||||
}
|
||||
|
||||
for(i = 1; i < argc; ++i) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue