From d109cc5aa81f4f35562318458023c6d1046c9451 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Thu, 9 Nov 2023 11:19:54 +0100 Subject: [PATCH] Do not the library in readOnly mode. The readOnly argument of `readFile` is to put the loaded library in readOnly mode. Which kinda means "Do not write again what is loaded". We don't want that for android as we want to save again our (potentially modified) library. See kiwix/kiwix-android#3474 --- lib/src/main/cpp/libkiwix/manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/main/cpp/libkiwix/manager.cpp b/lib/src/main/cpp/libkiwix/manager.cpp index 01da4da..5d0bbbf 100644 --- a/lib/src/main/cpp/libkiwix/manager.cpp +++ b/lib/src/main/cpp/libkiwix/manager.cpp @@ -41,7 +41,7 @@ METHOD(jboolean, readFile, jstring path) { auto cPath = TO_C(path); - return THIS->readFile(cPath); + return THIS->readFile(cPath, false); } CATCH_EXCEPTION(false) METHOD(jboolean, readXml, jstring content, jstring libraryPath)