Joel Bennett on Nostr: I know bash acts that way, but I don't understand why. If you want to be sure that ...
I know bash acts that way, but I don't understand why.
If you want to be sure that your _grandparent_ contains ABC/123 then you can test ../../ABC/123
Adding the ../.. on the end serves no purpose. Obviously the parent of ANY folder exists.
I would prefer if putting ".." on the RIGHT END of a path caused a warning or error. The only reason you would construct a path like that is you're dealing with user inputs, and these particular inputs are probably dangerous.
If you want to be sure that your _grandparent_ contains ABC/123 then you can test ../../ABC/123
Adding the ../.. on the end serves no purpose. Obviously the parent of ANY folder exists.
I would prefer if putting ".." on the RIGHT END of a path caused a warning or error. The only reason you would construct a path like that is you're dealing with user inputs, and these particular inputs are probably dangerous.