r3197: fixed error code mapping for ENOTDIR