mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 10:19:20 +00:00
FileManager: Canonicalize paths when opening them.
This commit is contained in:
parent
d94abc4f81
commit
7c06431ff7
Notes:
sideshowbarker
2024-07-19 15:33:55 +09:00
Author: https://github.com/awesomekling
Commit: 7c06431ff7
2 changed files with 4 additions and 2 deletions
|
@ -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());
|
||||
|
|
|
@ -37,5 +37,5 @@ void DirectoryTableView::set_status_message(const String& message)
|
|||
|
||||
void DirectoryTableView::open_parent_directory()
|
||||
{
|
||||
model().open("..");
|
||||
model().open(String::format("%s/..", model().path().characters()));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue