Creating files with reserved Windows file names creates issues within Windows
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 33.7k
- Forks
- 1.8k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 116
Description
-
Your Windows build number: Microsoft Windows [Version 10.0.15063]
-
What you're doing and what's happening:
echo "foobar" > con.out
This creates the file con.out in the current directory. It is totally usable from bash.
But from DOS, you cannot look at the file, rename the file, or do anything with it, because "CON" is a reserved file name. You cannot even rename the file from Windows Explorer.
- What's wrong / what should be happening instead:
Maybe a warning should be issued if from Linux, you are creating a file that has a name that is invalid for Windows. Or it should not be possible to create files with the reserved names.
Apparently, these are the reserved file names:
CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9 (see https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce echo "foobar" > con.out on the reported Windows build and inspect how WSL handles file creation and Windows-reserved names. The issue does not name files or tests, and its proposed outcomes differ; completion would require an agreed policy that either warns about or prevents names such as CON, PRN, and AUX.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100