This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/117436/

src/file/kcm/folderselectionwidget.cpp (Diff revision 1)
198
    return QDir::cleanPath(QDir::homePath() + "/..");
maybe QFileInfo(QDir::homePath()).absolutPath()

src/file/kcm/folderselectionwidget.cpp (Diff revision 1)
205
    if (url == QLatin1String("/home"))
210
    QString p = homeRoot();
p is a rather bad variable name :)
the question is what does this check protect against?
Might be easier to check if "url" is a prefix of QDir::homePath() if this protects against $HOME being excluded

- Kevin Krammer


On April 8th, 2014, 1 p.m. UTC, Lindsay Mathieson wrote:

Review request for Baloo.
By Lindsay Mathieson.

Updated April 8, 2014, 1 p.m.

Repository: baloo

Description

Part of the KCM code assumes the users home dir is under "/home", which is not always the cause in linux - e.g OpenSUSE with AD Authentication uses a /home/DOMAIN hierarchy. Other systems use /opt. Not to mention windows etc.

The code adds a function homeRoot() which returns the parent directory of the uses home directory.

Testing

Built, installed. Adding paths to the exclude lists still recognise the home root.

Diffs

  • src/file/kcm/folderselectionwidget.cpp (bc87a33)

View Diff