comparison src/fileio.c @ 12985:3adacdaa1d3f

(Fmake_symbolic_link, Fadd_name_to_file): Look for handler for the new name as well as for the target.
author Richard M. Stallman <rms@gnu.org>
date Sat, 02 Sep 1995 01:21:55 +0000
parents 032f8aae6bbe
children e1d400bc526e
comparison
equal deleted inserted replaced
12984:7c38c6da4aae 12985:3adacdaa1d3f
2122 handler = Ffind_file_name_handler (filename, Qadd_name_to_file); 2122 handler = Ffind_file_name_handler (filename, Qadd_name_to_file);
2123 if (!NILP (handler)) 2123 if (!NILP (handler))
2124 RETURN_UNGCPRO (call4 (handler, Qadd_name_to_file, filename, 2124 RETURN_UNGCPRO (call4 (handler, Qadd_name_to_file, filename,
2125 newname, ok_if_already_exists)); 2125 newname, ok_if_already_exists));
2126 2126
2127 /* If the new name has special constructs in it,
2128 call the corresponding file handler. */
2129 handler = Ffind_file_name_handler (newname, Qadd_name_to_file);
2130 if (!NILP (handler))
2131 RETURN_UNGCPRO (call4 (handler, Qadd_name_to_file, filename,
2132 newname, ok_if_already_exists));
2133
2127 if (NILP (ok_if_already_exists) 2134 if (NILP (ok_if_already_exists)
2128 || INTEGERP (ok_if_already_exists)) 2135 || INTEGERP (ok_if_already_exists))
2129 barf_or_query_if_file_exists (newname, "make it a new name", 2136 barf_or_query_if_file_exists (newname, "make it a new name",
2130 INTEGERP (ok_if_already_exists)); 2137 INTEGERP (ok_if_already_exists));
2131 #ifdef WINDOWSNT 2138 #ifdef WINDOWSNT
2178 linkname = Fexpand_file_name (linkname, Qnil); 2185 linkname = Fexpand_file_name (linkname, Qnil);
2179 2186
2180 /* If the file name has special constructs in it, 2187 /* If the file name has special constructs in it,
2181 call the corresponding file handler. */ 2188 call the corresponding file handler. */
2182 handler = Ffind_file_name_handler (filename, Qmake_symbolic_link); 2189 handler = Ffind_file_name_handler (filename, Qmake_symbolic_link);
2190 if (!NILP (handler))
2191 RETURN_UNGCPRO (call4 (handler, Qmake_symbolic_link, filename,
2192 linkname, ok_if_already_exists));
2193
2194 /* If the new link name has special constructs in it,
2195 call the corresponding file handler. */
2196 handler = Ffind_file_name_handler (linkname, Qmake_symbolic_link);
2183 if (!NILP (handler)) 2197 if (!NILP (handler))
2184 RETURN_UNGCPRO (call4 (handler, Qmake_symbolic_link, filename, 2198 RETURN_UNGCPRO (call4 (handler, Qmake_symbolic_link, filename,
2185 linkname, ok_if_already_exists)); 2199 linkname, ok_if_already_exists));
2186 2200
2187 if (NILP (ok_if_already_exists) 2201 if (NILP (ok_if_already_exists)