1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-03 09:56:15 +02:00
git/compat
Johannes Schindelin b6852e1979 mingw: do not treat `COM0` as a reserved file name
In 4dc42c6c18 (mingw: refuse paths containing reserved names,
2019-12-21), we started disallowing file names that are reserved, e.g.
`NUL`, `CONOUT$`, etc.

This included `COM<n>` where `<n>` is a digit. Unfortunately, this
includes `COM0` but only `COM1`, ..., `COM9` are reserved, according to
the official documentation, `COM0` is mentioned in the "NT Namespaces"
section but it is explicitly _omitted_ from the list of reserved names:
https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions

Tests corroborate this: it is totally possible to write a file called
`com0.c` on Windows 10, but not `com1.c`.

So let's tighten the code to disallow only the reserved `COM<n>` file
names, but to allow `COM0` again.

This fixes https://github.com/git-for-windows/git/issues/2470.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-04-08 12:15:51 -07:00
..
nedmalloc Fix spelling errors in no-longer-updated-from-upstream modules 2019-11-10 16:00:55 +09:00
poll mingw: workaround for hangs when sending STDIN 2020-02-27 14:23:29 -08:00
regex Merge branch 'jk/asan-build-fix' 2020-01-30 14:17:09 -08:00
vcbuild Sync with maint 2020-01-16 15:18:46 -08:00
win32 Sync with 2.23.1 2019-12-06 16:31:39 +01:00
access.c git-compat-util: work around for access(X_OK) under root 2019-04-25 17:49:44 +09:00
apple-common-crypto.h
basename.c
bswap.h compat/bswap: add include header guards 2019-03-07 07:42:14 +09:00
fileno.c git-compat-util: work around for access(X_OK) under root 2019-04-25 17:49:44 +09:00
fopen.c git_fopen: fix a sparse 'not declared' warning 2017-05-26 12:33:55 +09:00
gmtime.c
hstrerror.c
inet_ntop.c
inet_pton.c
memmem.c
mingw.c mingw: do not treat `COM0` as a reserved file name 2020-04-08 12:15:51 -07:00
mingw.h Merge branch 'js/mingw-open-in-gdb' 2020-02-17 13:22:18 -08:00
mkdir.c
mkdtemp.c
mmap.c compat: make sure git_mmap is not expected to write 2018-10-25 18:51:03 +09:00
msvc.c
msvc.h msvc: add pragmas for common warnings 2019-06-25 10:46:57 -07:00
obstack.c compat/obstack: fix -Wcast-function-type warnings 2019-01-17 11:13:38 -08:00
obstack.h obstack: avoid computing offsets from NULL pointer 2020-01-28 23:13:25 -08:00
pread.c
precompose_utf8.c Support working-tree-encoding "UTF-16LE-BOM" 2019-01-31 10:27:52 -08:00
precompose_utf8.h compat/precompose_utf8.h: use more common include guard style 2018-08-15 11:52:09 -07:00
qsort_s.c
setenv.c
sha1-chunked.c
sha1-chunked.h
snprintf.c
stat.c
strcasestr.c
strdup.c
strlcpy.c
strtoimax.c
strtoumax.c
terminal.c built-in add -p: handle Escape sequences more efficiently 2020-01-15 12:06:17 -08:00
terminal.h terminal: add a new function to read a single keystroke 2020-01-15 12:06:17 -08:00
unsetenv.c
win32.h
win32mmap.c
winansi.c mingw: work around incorrect standard handles 2019-11-23 11:17:01 +09:00