For determining the canonical path to a file specified by relative path or a path containing \..\
in the middle, stackoverflow suggests using GetFullPathName()
here or GetLongPathName()
here.
What is the difference between these functions?
The intent is to get paths starting with the drive letter from relative paths (like ..\someDir\someFile.txt
and someOtherDir\someFile.txt
) and to eliminate extra \..\
from the paths (like C:\dirA\dirB\..\someFile.txt
-> C:\dirA\someFile.txt
).