WSL/SLF GitLab Repository

Commit 45f4ecef authored by Mathias Bavay's avatar Mathias Bavay
Browse files

Small fix to store the last chosen directory, working both when a file or a directory was selected

parent 5dc3bb6e
......@@ -210,7 +210,11 @@ void FilePath::openFile()
}
if (!path.isNull()) {
setSetting("auto::history::last_panel_path", "path", QFileInfo( path ).absoluteDir().path());
const QFileInfo path_info( path+"/" );
if (path_info.isDir())
setSetting("auto::history::last_panel_path", "path", path_info.absolutePath());
else
setSetting("auto::history::last_panel_path", "path", path_info.absoluteDir().path());
//setProperty calls checkValue()
if (filename_only_)
this->setProperty("ini_value", QFileInfo( path ).fileName());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment