1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:48:14 +00:00

FileManager: Build new path of renamed files correctly

Fixes #2932.
This commit is contained in:
Till Mayer 2020-07-31 22:12:57 +02:00 committed by Andreas Kling
parent 0f7bba327f
commit 040848a2af
2 changed files with 3 additions and 1 deletions

View file

@ -75,6 +75,7 @@ PropertiesDialog::PropertiesDialog(GUI::FileSystemModel& model, String path, boo
m_name = lexical_path.basename();
m_path = lexical_path.string();
m_parent_path = lexical_path.dirname();
m_name_box = file_container.add<GUI::TextBox>();
m_name_box->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
@ -188,7 +189,7 @@ void PropertiesDialog::permission_changed(mode_t mask, bool set)
String PropertiesDialog::make_full_path(String name)
{
return String::format("%s/%s", m_model.root_path().characters(), name.characters());
return String::format("%s/%s", m_parent_path.characters(), name.characters());
}
bool PropertiesDialog::apply_changes()