On POSIX, rename() can replace files that are not writable. On Windows, however, read-only files cannot be replaced without additional efforts: We have to make the destination writable first. Since the situations where the destination is read-only are rare, we do not make the destination writable on every invocation, but only if the first try to rename a file failed with an "access denied" error. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> |
||
|---|---|---|
| .. | ||
| fnmatch | ||
| regex | ||
| fopen.c | ||
| hstrerror.c | ||
| inet_ntop.c | ||
| inet_pton.c | ||
| memmem.c | ||
| mingw.c | ||
| mingw.h | ||
| mkdtemp.c | ||
| mmap.c | ||
| pread.c | ||
| qsort.c | ||
| setenv.c | ||
| snprintf.c | ||
| strcasestr.c | ||
| strlcpy.c | ||
| strtoumax.c | ||
| unsetenv.c | ||
| winansi.c | ||