mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 02:42:48 +00:00
kdecore: do not append trailing slash to the path if the path is / from KDirWatch::addDir()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
12745a92d7
commit
5409d7035e
1 changed files with 1 additions and 1 deletions
|
@ -66,7 +66,7 @@ void KDirWatch::addDir(const QString &path, bool recurse)
|
|||
kDebug(7001) << "watching directory" << path;
|
||||
QString dirpath = path;
|
||||
// watching non-existing directory requires a trailing slash
|
||||
if (!dirpath.endsWith(QDir::separator())) {
|
||||
if (dirpath != QDir::rootPath() && !dirpath.endsWith(QDir::separator())) {
|
||||
dirpath.append(QDir::separator());
|
||||
}
|
||||
d->watcheddirs.append(dirpath);
|
||||
|
|
Loading…
Add table
Reference in a new issue