emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/android a78d4256687: Update Android port


From: Po Lu
Subject: feature/android a78d4256687: Update Android port
Date: Fri, 28 Jul 2023 03:46:05 -0400 (EDT)

branch: feature/android
commit a78d4256687373de109e1b88d51bfa0a278ab319
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Update Android port
    
    * src/androidvfs.c (android_document_id_from_name): Don't return
    0 if an SAF exception occurs.
---
 src/androidvfs.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/androidvfs.c b/src/androidvfs.c
index 4f485622ff4..7f61a4b4fa3 100644
--- a/src/androidvfs.c
+++ b/src/androidvfs.c
@@ -4179,7 +4179,9 @@ android_verify_jni_string (const char *name)
    document ID of that directory within *ID.
 
    If the designated file can't be located, return -1 and set errno
-   accordingly.  */
+   accordingly.  The reasons for which a file can't be located are not
+   all immediately obvious: quitting, for example, can cause document
+   ID lookup to be canceled.  */
 
 static int
 android_document_id_from_name (const char *tree_uri, char *name,
@@ -4236,7 +4238,10 @@ android_document_id_from_name (const char *tree_uri, 
char *name,
   inside_saf_critical_section = false;
 
   if (android_saf_exception_check (3, result, uri, java_name))
-    goto finish;
+    {
+      rc = -1;
+      goto finish;
+    }
 
   ANDROID_DELETE_LOCAL_REF (uri);
   ANDROID_DELETE_LOCAL_REF (java_name);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]