mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 23:55:38 +00:00
Added symlink support on removeCommonPath
This commit is contained in:
parent
59d4ad7c1e
commit
9b78834b42
|
@ -110,7 +110,8 @@ fs::path removeCommonPath(const fs::path& path, const fs::path& relativeTo, bool
|
|||
return path;
|
||||
}
|
||||
|
||||
fs::path p = fs::canonical(path);
|
||||
// if it's a symlink we don't want to apply fs::canonical on it, otherwise we'll lose the current parent_path
|
||||
fs::path p = (fs::is_symlink(path) ? fs::canonical(path.parent_path()) / path.filename() : fs::canonical(path));
|
||||
fs::path r = fs::canonical(relativeTo);
|
||||
|
||||
if(p.root_path() != r.root_path())
|
||||
|
|
Loading…
Reference in a new issue