在对std :: filesystem :: canonical或std :: filesystem :: weakly_canonical的调用上,lexically_normal是否冗余?

问题描述

在以下两种情况下,是否有理由调用lexically_normal:

std::filesystem::path filepath = someFuntionThatGetsAPath();

filepath = std::filesystem::canonical (filepath).lexically_normal ();
filepath = std::filesystem::weakly_canonical (filepath).lexically_normal ();

我在代码库中看到了这个,并且不确定是否有必要。我假设规范的和弱规范的不会失败,并且已经返回规范化的路径。

谢谢

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)