summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/file.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index 96a9cfecf2b1..b6a0acaae2c4 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -830,8 +830,15 @@ oslFileError openFilePath(const char *cpFilePath, oslFileHandle* pHandle, sal_uI
{
void* address;
size_t size;
+ // some requests are /assets//foo...
+ size_t offset = sizeof("/assets/")-1;
+ if (cpFilePath[offset] == '/') {
+ __android_log_print(ANDROID_LOG_DEBUG,"libo:sal/osl/unx/file", "double-slash in path: %s", cpFilePath);
+ offset++;
+ }
AAssetManager* mgr = lo_get_native_assetmgr();
- AAsset* asset = AAssetManager_open(mgr, cpFilePath + sizeof("/assets/")-1, AASSET_MODE_BUFFER);
+ AAsset* asset = AAssetManager_open(mgr, cpFilePath + offset, AASSET_MODE_BUFFER);
+
if (!asset)
{
address = NULL;