comparison src/fileio.c @ 3017:3afba65e22fa

* fileio.c (Ffile_writable_p): Pass XSTRING (foo)->data to ro_fsys, not XSTRING (foo).
author Jim Blandy <jimb@redhat.com>
date Mon, 24 May 1993 15:22:47 +0000
parents e94a593c3952
children 371058345c42
comparison
equal deleted inserted replaced
3016:ce9ea90b5848 3017:3afba65e22fa
2110 if (!NILP (handler)) 2110 if (!NILP (handler))
2111 return call2 (handler, Qfile_writable_p, abspath); 2111 return call2 (handler, Qfile_writable_p, abspath);
2112 2112
2113 if (access (XSTRING (abspath)->data, 0) >= 0) 2113 if (access (XSTRING (abspath)->data, 0) >= 0)
2114 return ((access (XSTRING (abspath)->data, 2) >= 0 2114 return ((access (XSTRING (abspath)->data, 2) >= 0
2115 && ! ro_fsys (XSTRING (abspath))) 2115 && ! ro_fsys ((char *) XSTRING (abspath)->data))
2116 ? Qt : Qnil); 2116 ? Qt : Qnil);
2117 dir = Ffile_name_directory (abspath); 2117 dir = Ffile_name_directory (abspath);
2118 #ifdef VMS 2118 #ifdef VMS
2119 if (!NILP (dir)) 2119 if (!NILP (dir))
2120 dir = Fdirectory_file_name (dir); 2120 dir = Fdirectory_file_name (dir);
2121 #endif /* VMS */ 2121 #endif /* VMS */
2122 return ((access (!NILP (dir) ? (char *) XSTRING (dir)->data : "", 2) >= 0 2122 return ((access (!NILP (dir) ? (char *) XSTRING (dir)->data : "", 2) >= 0
2123 && ! ro_fsys ((char *) XSTRING (dir))) 2123 && ! ro_fsys ((char *) XSTRING (dir)->data))
2124 ? Qt : Qnil); 2124 ? Qt : Qnil);
2125 } 2125 }
2126 2126
2127 DEFUN ("file-directory-p", Ffile_directory_p, Sfile_directory_p, 1, 1, 0, 2127 DEFUN ("file-directory-p", Ffile_directory_p, Sfile_directory_p, 1, 1, 0,
2128 "Return t if file FILENAME is the name of a directory as a file.\n\ 2128 "Return t if file FILENAME is the name of a directory as a file.\n\