Jinoh Kang (@iamahuman) commented about server/fd.c:
+ break; + } + if (i >= 0x8000) + { + set_error( STATUS_UNSUCCESSFUL ); + goto ret; + } + + if (!is_dir) + { + /* we can't just do rename(2) here; renaming a file to its hardlink is no-op */ + if (linkat( dirfd, tmpname, dirfd, dstname, 0 ) && errno != EEXIST) + { + if (errno == EPERM || errno == EOPNOTSUPP) + { + /* FIXME: filesystem doesn't support hardlinks, entire operation might be a no-op on casefold dirs */ If a filesystem does not support hardlinks, different dentry means different file so it shouldn't be a silent no-op (for bind mounts it would return EBUSY, which is not silent)
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/6855#note_98190