Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Explanation? I guess it has something to do with the league of special file names like CON NUL and PRN?


The tweet is the start of a long explanation, btw. The poster makes a few corrections at the end, but the story is worry reading.


I’d worry too, trying to read a blog post spread out across 100 tweets.



Yea, it's not really a bug so much as just a very old legacy limitation. Microsoft has ripped out a lot of NT/XP compatibility in Win 7/8/10. I wonder if these special names are still in a lot of use, or if it's just low priority (or it's in a part of the code base where it's low tech debt and no one cares).


Exactly. I read this thread this morning and found it a bit frustrating that is was being called a bug. This isn't a bug, it's a documented feature that still exists for backwards compatibility. You may not like it, or may not agree that it still exists, but it was intentionally designed and has been intentionally kept around. It's like complaining that you can't make a file name with / in it under linux (or perhaps making a file with / in it's name on a system that allows it then saying linux has a bug when it can't open it).


This feature has long outlived its usefulness, and should've been deprecated decades ago. Windows can run programs in "compatibility mode", so there is really no reason to keep these special files around for most programs. Maybe run CMD.COM in compatibility mode by default, so that batch files still work like 40 years ago, but other than that there is no reason to have that feature/limitation imposed on the graphical file Explorer, or pretty much any other software.

Not being able to use / in filenames under Linux is slightly different because the / has an actual legitimate widespread use with no real alternative.


Yes and no. In Linux you can use an Unicode that looks like slash. Candidates are U+2044, U+2215, U+29F8, U+FF0F, and U+2571.

However similar trick probably would work in Windows as well. Does anybody care to try? :)


Unicode tricks work on Windows too, it's just the exact \ / etc. characters that are reserved.


A comment elsewhere on this page claims that COM² and COM³ are also forbidden in Windows, due to Unicode mapping...


Also, I've just tried and on Mac OS I can create a folder with "/" in the name no problem.


The path separator on HFS is :, not /


o_O TIL.


I imagine popular ones like NUL and CON are still in use; I have machines running daily batch files containing those.

Using long UNC paths or writing to the FAT/NTFS filesystem through mechanisms other than Win32 allows you to bypass the restriction.

If you really want to be nasty to someone: echo hello > \\.\C:\Con.fess.I.know.what.you.did


I recommend reading the submission, it may answer your question.


The author of the tweet does a fanstastic job explaining the bug. He wrote a bunch of follow up tweets in reply to his orginal tweet.


And he spends way too long with his crappy version of storytelling before he gets to the point


He also explains that he wrote that 5am from an hospital. From my point of view, he was just venting his frustrations making a point of how old the error origin was.

It was not "storytelling", he was not writing it with the main goal of "getting to the point" so you could benefit. Calling it "crappy" sounds unfair and mean to me.


It is crappy in the sense that it is yet another person repeating the same tired trope of highlighting just how supposedly egregious some issue is in context of arbitrary events that happen to share the timeline. I am sick of this sort of temporally-oriented futurism as it betrays the writer's inexperience in actually shipping code and I am sick of amateurs being taken seriously in this field.

Yeah, its an old issue, obviously nobody cared enough to fix it until now, STFU...

edit- and finally, its twitter. stick to the character limit, or put it in a blog post.

(and maybe this should be my last beer :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: