diff options
author | David Tardon <dtardon@redhat.com> | 2015-12-07 13:10:50 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2015-12-07 13:13:56 +0100 |
commit | 764ec21307009a84b2611fed5cb20069caa6d566 (patch) | |
tree | f82fae80ee87f5cc0c8c491adbff9c3beafd4ffc /include/LibreOfficeKit | |
parent | 7f73ea2e3975b305e09467eb7980a3d01cd37de9 (diff) |
improve error message for nonexist. path
... which is currently somewhat misleading, because it mentions
libmerged.so.
Change-Id: I1ab21ce0fe2f94eba1831c2c977d900827f320f1
Diffstat (limited to 'include/LibreOfficeKit')
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKitInit.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKitInit.h b/include/LibreOfficeKit/LibreOfficeKitInit.h index 66d52837fd10..880f11e2391e 100644 --- a/include/LibreOfficeKit/LibreOfficeKitInit.h +++ b/include/LibreOfficeKit/LibreOfficeKitInit.h @@ -155,6 +155,13 @@ static void *lok_dlopen( const char *install_path, char ** _imp_lib ) if (!install_path) return NULL; + struct stat dir_st; + if (stat(install_path, &dir_st) != 0) + { + fprintf(stderr, "installation path \"%s\" does not exist\n", install_path); + return NULL; + } + // allocate large enough buffer partial_length = strlen(install_path); imp_lib = (char *) malloc(partial_length + sizeof(TARGET_LIB) + sizeof(TARGET_MERGED_LIB) + 2); |