diff options
author | Tor Lillqvist <tlillqvist@suse.com> | 2012-01-04 14:18:02 +0200 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@suse.com> | 2012-01-04 15:33:39 +0200 |
commit | d37157372db95ee64afdc6e74c536e28fc5bbd6e (patch) | |
tree | af3b6c87c80b429bba386cfec9256ba3c4d2367e /sal/osl | |
parent | 36ce37def3c7dde751098649763479ca21321a9a (diff) |
Handle /assets paths also in realpath_u()
Diffstat (limited to 'sal/osl')
-rw-r--r-- | sal/osl/unx/uunxapi.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sal/osl/unx/uunxapi.cxx b/sal/osl/unx/uunxapi.cxx index 61fac80895e8..86e86e2bb32d 100644 --- a/sal/osl/unx/uunxapi.cxx +++ b/sal/osl/unx/uunxapi.cxx @@ -113,6 +113,20 @@ { #ifndef MACOSX // not MACOSX rtl::OString fn = OUStringToOString(pustrFileName); +#ifdef ANDROID + if (strncmp(fn.getStr(), "/assets", sizeof("/assets")-1) == 0 && + (fn.getStr()[sizeof("/assets")-1] == '\0' || + fn.getStr()[sizeof("/assets")-1] == '/')) + { + if (access_u(pustrFileName, F_OK) == -1) + return sal_False; + + rtl_uString silly(*pustrFileName); + rtl_uString_assign(ppustrResolvedName, &silly); + + return sal_True; + } +#endif #else rtl::OString fn = macxp_resolveAliasAndConvert(pustrFileName); #endif |