diff options
| author | Geoff Voelker | 1997-09-03 00:30:24 +0000 |
|---|---|---|
| committer | Geoff Voelker | 1997-09-03 00:30:24 +0000 |
| commit | bb1ff1f449fd50faf8a5d259b180d6e0f552af81 (patch) | |
| tree | 45c5b94e4530297a6281d8426c987a6ffd8cb5d1 /src/fileio.c | |
| parent | 16f49a88c2c47ff9ae7dad792821303f3967c2b1 (diff) | |
| download | emacs-bb1ff1f449fd50faf8a5d259b180d6e0f552af81.tar.gz emacs-bb1ff1f449fd50faf8a5d259b180d6e0f552af81.zip | |
(Fexpand_file_name) [WINDOWSNT]: When stripping
drive letter, be careful not to create a UNC filename.
(Fadd_name_to_file) [WINDOWSNT]: Remove conditional.
Diffstat (limited to 'src/fileio.c')
| -rw-r--r-- | src/fileio.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/fileio.c b/src/fileio.c index 6c021226514..fa7b51d7e9d 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -917,6 +917,14 @@ See also the function `substitute-in-file-name'.") | |||
| 917 | goto look_again; | 917 | goto look_again; |
| 918 | } | 918 | } |
| 919 | } | 919 | } |
| 920 | |||
| 921 | #ifdef WINDOWSNT | ||
| 922 | /* If we see "c://somedir", we want to strip the first slash after the | ||
| 923 | colon when stripping the drive letter. Otherwise, this expands to | ||
| 924 | "//somedir". */ | ||
| 925 | if (drive && IS_DIRECTORY_SEP (nm[0]) && IS_DIRECTORY_SEP (nm[1])) | ||
| 926 | nm++; | ||
| 927 | #endif /* WINDOWSNT */ | ||
| 920 | #endif /* DOS_NT */ | 928 | #endif /* DOS_NT */ |
| 921 | 929 | ||
| 922 | #ifdef WINDOWSNT | 930 | #ifdef WINDOWSNT |
| @@ -2357,10 +2365,6 @@ This is what happens in interactive use with M-x.") | |||
| 2357 | || INTEGERP (ok_if_already_exists)) | 2365 | || INTEGERP (ok_if_already_exists)) |
| 2358 | barf_or_query_if_file_exists (newname, "make it a new name", | 2366 | barf_or_query_if_file_exists (newname, "make it a new name", |
| 2359 | INTEGERP (ok_if_already_exists), 0); | 2367 | INTEGERP (ok_if_already_exists), 0); |
| 2360 | #ifdef WINDOWSNT | ||
| 2361 | /* Windows does not support this operation. */ | ||
| 2362 | report_file_error ("Adding new name", Flist (2, &file)); | ||
| 2363 | #else /* not WINDOWSNT */ | ||
| 2364 | 2368 | ||
| 2365 | unlink (XSTRING (newname)->data); | 2369 | unlink (XSTRING (newname)->data); |
| 2366 | if (0 > link (XSTRING (file)->data, XSTRING (newname)->data)) | 2370 | if (0 > link (XSTRING (file)->data, XSTRING (newname)->data)) |
| @@ -2373,7 +2377,6 @@ This is what happens in interactive use with M-x.") | |||
| 2373 | report_file_error ("Adding new name", Flist (2, &file)); | 2377 | report_file_error ("Adding new name", Flist (2, &file)); |
| 2374 | #endif | 2378 | #endif |
| 2375 | } | 2379 | } |
| 2376 | #endif /* not WINDOWSNT */ | ||
| 2377 | 2380 | ||
| 2378 | UNGCPRO; | 2381 | UNGCPRO; |
| 2379 | return Qnil; | 2382 | return Qnil; |