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

> Windows allows files to be named `..`?!

Maybe not?

Under unix, if you create a symlink to a directory, e.g. `~/syslogs` is a symlink to `/var/log`, then `..` can be used to traverse the "true" parent directory. So `~/syslogs/../lib` will traverse `/var/log/..` and refer to `/var/lib`, not to `~/lib`.

However, a "normalising" path interpreter will just take something like `~/syslogs/../lib` and change it to `~/lib` without consulting the filesystem.

Given that (AIUI) Windows has supported symlinks for a while now (?), it's possible that files called `..` aren't actually allowed, but the ability to access `..` is still necessary.

(Notably, the article does point out that filenames ending in `.` are disallowed - which should exclude `..` as a name one can give a file.)



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

Search: