diff options
author | Andreas Kling <kling@serenityos.org> | 2020-11-01 17:17:23 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-11-01 19:21:19 +0100 |
commit | a28f29c82c1967bd017f02aa6ce254335cd48394 (patch) | |
tree | e9f6b0db8aa4569a7dd00829fdabdeb1b56f79cf /Userland/cat.cpp | |
parent | 13aa3d2d62e3fcd21c029cf91c930d09deb148cb (diff) | |
download | serenity-a28f29c82c1967bd017f02aa6ce254335cd48394.zip |
Kernel+LibC: Don't allow a directory to become a subdirectory of itself
If you try to do this (e.g "mv directory directory"), sys$rename() will
now fail with EDIRINTOSELF.
Dr. POSIX says we should return EINVAL for this, but a custom error
code allows us to print a much more helpful error message when this
problem occurs. :^)
Diffstat (limited to 'Userland/cat.cpp')
0 files changed, 0 insertions, 0 deletions