Last active
May 4, 2022 07:50
-
-
Save karwa/cbef7e798d6d92de95d837aac88ece40 to your computer and use it in GitHub Desktop.
Windows paths are garbage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using non-canonicalized paths (`\\?\C:\Users\User\Desktop\test\bar.` etc), you can create files which: | |
- Won't show up on the desktop (although they will show up in Windows Explorer). | |
- You can't open (tried in notepad via drag-and-drop and the 'open' panel). | |
- You can't delete. | |
Also, you can't delete their parent folder, either. Nice. | |
Additionally, some commands will resolve '.' components in paths, while others (like `mkdir`), but others (like `echo "hello" > \\?\C:\...` in CMD.exe) will reject those paths outright. | |
Hot. Garbage. | |
This is just shoddy engineering. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment