Sandroid_relinquish_directory_access, 1, 1,
"DDirectory: ",
doc: /* Relinquish access to the provided directory.
-DIRECTORY must be an inferior directory to a subdirectory of
-/content/storage. Once the command completes, the parent of DIRECTORY
-below that subdirectory from will cease to appear there, but no files
-will be removed. */)
+DIRECTORY must be the toplevel directory of an open SAF volume (i.e., a
+file under /content/storage), or one of its inferiors. Once the command
+completes, the SAF directory holding this directory will vanish, but no
+files will be removed. */)
(Lisp_Object file)
{
struct android_vnode *vp;
return Qnil;
file = ENCODE_FILE (Fexpand_file_name (file, Qnil));
- vp = android_name_file (SSDATA (file));
+
+ if (!NILP (call1 (Qfile_remote_p, file)))
+ signal_error ("Cannot relinquish access to remote file", file);
+
+ vp = android_name_file (SSDATA (file));
+
+ if (!vp)
+ report_file_error ("Relinquishing directory", file);
if (vp->type != ANDROID_VNODE_SAF_TREE)
{
Lisp_Object val = Qnil;
if (STRINGP (curdir))
- val = dsafe_call1 (intern ("file-remote-p"), curdir);
+ val = dsafe_call1 (Qfile_remote_p, curdir);
val = unbind_to (count, val);
The recommended non-zero value is between 100000 and 1000000,
depending on your patience and the speed of your system. */);
max_redisplay_ticks = 0;
+
+ /* Called by decode_mode_spec. */
+ DEFSYM (Qfile_remote_p, "file-remote-p");
}