Open razonyang opened 4 months ago
please check this old docs
https://msdn.microsoft.com/en-gb/library/windows/desktop/aa365247(v=vs.85).aspx
reserved files names from MS-DOS ...
The underlying problem isn't limited to taxonomy terms. For example, hugo new nul/p1.md
throws:
Error: process: readAndProcessContent: walk: Readdir: readdir C:\temp\foo\content\nul: Incorrect function.
And you're left with a directory named "nul" that you cannot delete.
So, if I'm reading the link from @gj52 ... all of these are invalid filenames on Windows?
And also any combination of CON, PRN, AUX, NUL, COM0, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, COM, COM, COM, LPT0, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9, LPT, LPT, and LPT.
Of all of the file names listed above, only "nul" (including case variations) causes a problem.
Command | Notes |
---|---|
hugo new nul.md |
File is created without error. Error thrown when building the site because there's a directory named "nul" in the path. |
hugo new nul/p1.md |
Error thrown when creating file because there's a directory named "nul" in the path. |
Although you can delete a file named "nul.whatever", you cannot delete a directory named "nul". I had to use WSL then access /mnt/c/something
.
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Yes
Reproduce Steps
Create
content/foo.md
with the following content.And then build site.
I'm awared that the issue isn't related to Hugo directly (golang/go#24556), is it possible to handle it in Hugo layer? For example, rename the
nul
folder as other on Windows?