aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPo Lu2023-08-03 20:14:28 +0800
committerPo Lu2023-08-03 20:14:28 +0800
commit01849bf811787a201fd2734178ca053d8e22d36a (patch)
treed4b271c2c92240e9df72e3ba34d53a26f89e710a /src
parent1c429b7fef2e472cbd1dd8e8f237179ed6616975 (diff)
downloademacs-01849bf811787a201fd2734178ca053d8e22d36a.tar.gz
emacs-01849bf811787a201fd2734178ca053d8e22d36a.zip
* src/fileio.c (check_vfs_filename): Revert earlier change.
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 1a7a7152844..a0483aa2528 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -184,12 +184,9 @@ static bool e_write (int, Lisp_Object, ptrdiff_t, ptrdiff_t,
184 184
185/* Establish that ENCODED is not contained within a special directory 185/* Establish that ENCODED is not contained within a special directory
186 whose contents are not eligible for Unix VFS operations. Signal a 186 whose contents are not eligible for Unix VFS operations. Signal a
187 `file-error' with REASON if it does. 187 `file-error' with REASON if it does. */
188 188
189 If REASON is NULL, instead return whether ENCODED is contained 189static void
190 within such a directory. */
191
192static bool
193check_vfs_filename (Lisp_Object encoded, const char *reason) 190check_vfs_filename (Lisp_Object encoded, const char *reason)
194{ 191{
195#if defined HAVE_ANDROID && !defined ANDROID_STUBIFY 192#if defined HAVE_ANDROID && !defined ANDROID_STUBIFY
@@ -199,14 +196,7 @@ check_vfs_filename (Lisp_Object encoded, const char *reason)
199 196
200 if (android_is_special_directory (name, "/assets") 197 if (android_is_special_directory (name, "/assets")
201 || android_is_special_directory (name, "/content")) 198 || android_is_special_directory (name, "/content"))
202 { 199 xsignal2 (Qfile_error, build_string (reason), encoded);
203 if (!reason)
204 return true;
205
206 xsignal2 (Qfile_error, build_string (reason), encoded);
207 }
208
209 return false;
210#endif /* defined HAVE_ANDROID && !defined ANDROID_STUBIFY */ 200#endif /* defined HAVE_ANDROID && !defined ANDROID_STUBIFY */
211} 201}
212 202