Best way to determine if two path reference to same file in Windows?

后端 未结 11 1636
生来不讨喜
生来不讨喜 2020-11-30 11:23

How would I compare 2 strings to determine if they refer to the same path in Win32 using C/C++?

While this will handle a lot of cases it misses some things:

11条回答
  •  [愿得一人]
    2020-11-30 11:48

    Open both files and use GetFinalPathNameByHandle() against the HANDLEs. Then compare the paths.

提交回复
热议问题