summaryrefslogtreecommitdiff
path: root/src/fileio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/fileio.c b/src/fileio.c
index a92da93ae48..12da7a9ed3a 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -847,7 +847,7 @@ Each element in COMPONENTS must be a string or nil.
DIRECTORY or the non-final elements in COMPONENTS may or may not end
with a slash -- if they don't end with a slash, a slash will be
inserted before concatenating.
-usage: (record DIRECTORY &rest COMPONENTS) */)
+usage: (file-name-concat DIRECTORY &rest COMPONENTS) */)
(ptrdiff_t nargs, Lisp_Object *args)
{
ptrdiff_t chars = 0, bytes = 0, multibytes = 0, eargs = 0;
@@ -5628,7 +5628,15 @@ write_region (Lisp_Object start, Lisp_Object end, Lisp_Object filename,
changed to a call to `stat'. */
if (emacs_fstatat (AT_FDCWD, fn, &st1, 0) == 0
- && st.st_dev == st1.st_dev && st.st_ino == st1.st_ino)
+ && st.st_dev == st1.st_dev
+ && (st.st_ino == st1.st_ino
+#if defined HAVE_ANDROID && !defined ANDROID_STUBIFY
+ /* `st1.st_ino' == 0 indicates that the inode number
+ cannot be extracted from this document file, despite
+ `st' potentially being backed by a real file. */
+ || st1.st_ino == 0
+#endif /* defined HAVE_ANDROID && !defined ANDROID_STUBIFY */
+ ))
{
/* Use the heuristic if it appears to be valid. With neither
O_EXCL nor O_TRUNC, if Emacs happened to write nothing to the