I think sockets (where the 0th char is ?s) are also considered regular files. Also, I think that patch checks whether the truename is a regular file, but I believe /all/ symlinks are considered regular. How about this version?