Skip to content
Snippets Groups Projects
Unverified Commit 62821a79 authored by Erwin Ried's avatar Erwin Ried Committed by GitHub
Browse files

Merge pull request #116 from euquiq/fix-filemanager-rename-placing-file-on-root

fixes file renaming on subdir
parents 41cecc88 bb264dcf
No related branches found
No related tags found
No related merge requests found
......@@ -249,7 +249,11 @@ FileLoadView::FileLoadView(
void FileManagerView::on_rename(NavigationView& nav) {
text_prompt(nav, name_buffer, max_filename_length, [this](std::string& buffer) {
rename_file(get_selected_path(), buffer);
std::string destination_path = current_path.string();
if (destination_path.back() != '/')
destination_path += '/';
destination_path = destination_path + buffer;
rename_file(get_selected_path(), destination_path);
load_directory_contents(current_path);
refresh_list();
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment