So, I remember having this problem once twenty years ago with MS-DOS.
My expectation is that cursed/linux/javastics/linux is cursed/linux; that adding a file to one adds it to the other.
In MS-DOS there's no concept of hard-links, but that doesn't mean that the file allocation table or equivalent can't say that the abstract concept of the linux folder exists in the cursed folder and the javastics folder. It shouldn't, it's illegal, but it can.
And you can't get to the end of this infinite recursion because linux always contains javastics which always contains linux.
Windows/Linux are a little more complicated; there are legitimate hard-links (but they're only for files, not folders) and junctions and symbolic links (symlinks) exist which could potentially replicate this behaviour without horrid low-level data corruption. I don't know enough to advise you on how to detect these, but:
https://superuser.com/questions/524669/checking-where-a-symbolic-link-points-at-in-windows-7 claims dir /a will tell you about symlinks, and https://www.computerhope.com/jargon/j/junction.htm agrees for junctions.
If it is corrupted; then this is not a problem caused by the rogue VSCode plugin, but a data integrity problem occurring at a level it should be impossible for application code to cause.
If you really care about the integrity of anything on your system:
- back-up your data that isn't backed up and don't trust the backups
- get new physical media
- restore from backups
If you don't care too much, then run chkdsk, but I would council against using /F initially -- the fix might involve deleting that datastructure, and there may be other issues you weren't aware of. You can probably rename the cursed folder to something else and ignore it and you'll probably be fine (although it might be indicative of some sort of bigger physical problem which might bite you in the end.)
Oh, and I think I had to format that system pretty soon after that bug; I think I tried deleting ../../*, and the .. pointer in linux pointed just fine at cursed, and the .. pointer in cursed pointed just fine at my root directory...
billions ??) of nested foldersthat is possible, however the primary concern if/when this occurs is the performance impact. A folder is a very small file, and is stored directly in the MFT of the volume. I haven't tested it, but creating one billion folders should add several GB to the MFT, possibly fragmented depending on the fragmentation of the free space. This may result in a volume with poor performance.