summaryrefslogtreecommitdiff
path: root/dir-iterator.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2019-12-21 22:05:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-12-22 00:09:07 (GMT)
commit4dc42c6c1867a52e22f1f04a1a247b5a7538b8af (patch)
tree2198d9e1995d36e5448de2dcf2c9063563f03803 /dir-iterator.c
parent98d9b23e90510c5acafa2ebc9463cc2293f40df0 (diff)
downloadgit-4dc42c6c1867a52e22f1f04a1a247b5a7538b8af.zip
git-4dc42c6c1867a52e22f1f04a1a247b5a7538b8af.tar.gz
git-4dc42c6c1867a52e22f1f04a1a247b5a7538b8af.tar.bz2
mingw: refuse paths containing reserved names
There are a couple of reserved names that cannot be file names on Windows, such as `AUX`, `NUL`, etc. For an almost complete list, see https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file If one would try to create a directory named `NUL`, it would actually "succeed", i.e. the call would return success, but nothing would be created. Worse, even adding a file extension to the reserved name does not make it a valid file name. To understand the rationale behind that behavior, see https://devblogs.microsoft.com/oldnewthing/20031022-00/?p=42073 Let's just disallow them all. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir-iterator.c')
0 files changed, 0 insertions, 0 deletions