relative path is not computed if already relative; editor updates;

This commit is contained in:
Turánszki János
2022-09-27 22:33:47 +02:00
parent 3a9bee53e1
commit e081dcc089
4 changed files with 20 additions and 17 deletions
+7 -4
View File
@@ -649,11 +649,14 @@ namespace wi::helper
#else
std::filesystem::path filepath = path;
std::filesystem::path rootpath = rootdir;
std::filesystem::path relative = std::filesystem::relative(path, rootdir);
if (!relative.empty())
if (filepath.is_absolute())
{
path = relative.string();
std::filesystem::path rootpath = rootdir;
std::filesystem::path relative = std::filesystem::relative(path, rootdir);
if (!relative.empty())
{
path = relative.string();
}
}
#endif // PLATFORM_UWP