in reply to Testing if two paths point to the same file.

There's no reason to limit oneself to plain files. I'd remove the -f checks.

The inode is always 0 on Windows+NTFS

The device id is 0 for A:, 1 for B: .., 25 for Z:. It doesn't work with UNC paths such as "\\?\C:\". It doesn't check if two drives are the same with different names (e.g. when using SUBST).