Skip to content

Fix ProjectController::prettyFileName for paths ending with a slash

Previously, due to how QUrl::fileName works, prettyFilename would drop the last part of a path, if the path ended with a slash. I.e.,

prettyFileName(QUrl("/project/dir/test/ret/"))

would return

"project name:/test/"

instead of

"project name:/test/ret/"

This commit fixes that. This also fixes the display of untracked directories in the Git Commit toolview.

See also !280 (closed)

Merge request reports