FileManager: Canonicalize paths when opening them.

This commit is contained in:
Andreas Kling 2019-03-03 00:40:50 +01:00
commit 7c06431ff7
Notes: sideshowbarker 2024-07-19 15:33:55 +09:00
2 changed files with 4 additions and 2 deletions

View file

@ -187,8 +187,10 @@ void DirectoryTableModel::update()
did_update();
}
void DirectoryTableModel::open(const String& path)
void DirectoryTableModel::open(const String& a_path)
{
FileSystemPath canonical_path(a_path);
auto path = canonical_path.string();
if (m_path == path)
return;
DIR* dirp = opendir(path.characters());