mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 23:15:07 +00:00
AK: Add a canonicalized_path() convenience function.
This is the same as calling FileSystemPath(foo).string(). The majority of clients only care about canonicalizing a path, so let's have an easy way to express that.
This commit is contained in:
parent
cd497accbe
commit
954a0b8efe
7 changed files with 33 additions and 25 deletions
|
@ -301,8 +301,7 @@ void GDirectoryModel::update()
|
|||
|
||||
void GDirectoryModel::open(const StringView& a_path)
|
||||
{
|
||||
FileSystemPath canonical_path(a_path);
|
||||
auto path = canonical_path.string();
|
||||
auto path = canonicalized_path(a_path);
|
||||
if (m_path == path)
|
||||
return;
|
||||
DIR* dirp = opendir(path.characters());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue