Closed
Description
Describe the bug
It appears to be a bug in gulark's filesystem::canonical which fails to properly resolve relative path to a mapped drive. C++17 std::filesystem::canonical doesn't have this issue and properly resolves the relative path.
In this scenario C:\MOUNT_ME is a folder that is mapped to a folder on an external hard drive G:\RTS
on Windows:
Plugin and external drive or USB Drive to your computer.
Go to Disk Manager.
Right Click on your connected drive.
Select "Change Drive Letter and Path..."
Select "Add".
Use "Mount in the following empty NTFS folder:"
Locate the folder you want to mount to.
ghc::filesystem::canonical
auto fullPath = ghc::filesystem::path(currentFileDir).append(relativeFilePath);
// C:\\MOUNT_ME\\RTS\\RTS\\master_files\\..\\referenced_files\\USD\\barrelTests\\Library\\Assets\\Barrels\\Barrels.usd
auto path = ghc::filesystem::canonical(fullPath, errorCode); // error
std::filesystem::canonical
auto fullPath = std::filesystem::path(currentFileDir).append(relativeFilePath);
//"C:\\MOUNT_ME\\RTS\\RTS\\master_files\\../referenced_files/USD/barrelTests/Library/Assets/Barrels/Barrels.usd"
auto path = std::filesystem::canonical(fullPath, errorCode); // Ok, good
Expected behavior
ghc::filesystem::canonical should behave similar to std::filesystem::canonical.
Additional context
Autodesk/maya-usd#1422