top | item 35748154

(no title)

overthrow | 2 years ago

It is true.

https://stackoverflow.com/questions/40794287/cannot-write-to...

https://www.howtogeek.com/wp-content/uploads/2018/11/img_5be...

discuss

order

cesarb|2 years ago

And for the historical explanation for why these filenames are special even with an extension, see https://devblogs.microsoft.com/oldnewthing/20031022-00/?p=42...

"Suppose you wanted the listing file to go straight to the printer. [...] So you typed “PRN” as the filename. Now, the assembler doesn’t know about these magic filenames. So the assembler will try to create the file “PRN.LST” and then start writing to it. Little does the assembler realize that the output is actually going to the printer."

Windows path handling is full of special cases and subtle gotchas. See https://googleprojectzero.blogspot.com/2016/02/the-definitiv... for a very detailed list.

justeleblanc|2 years ago

Look, I just created a file named "aux.rs" on my Windows machine. It's not true.

franga2000|2 years ago

I've seen this plenty of times, but maybe if was fixed in the last year or so. My issue was when trying to delete a Linux source tree that was git cloned on Linux onto a flash drive. Maybe the filesystem had something to do with it, but it was entirely impossible to delete it using any tool I know of in Windows.

ygra|2 years ago

I think they have changed it so that you can by now create files with forbidden names and an extension. But that's a somewhat recent change.

Also you could always create such names with the right APIs, so one application could create such files, but another can't delete them or open them.

igorv|2 years ago

Same. It's definitely not true