Commit c353bb21 authored by Elvis Angelaccio's avatar Elvis Angelaccio

LocalLister: always append trailing slash if it's a folder

Summary:
We were adding the trailing slash only when recursively calling scan(),
but we need to do the same also when calling Folder::append().

Test Plan:
1. filelight ~/home/foo/bar
2. go up to ~/home/foo
3. check whether /home/foo/bar has the trailing slash in the relevant map tooltips.

Differential Revision: https://phabricator.kde.org/D10801
parent 96026dcd
......@@ -203,7 +203,7 @@ LocalLister::scan(const QByteArray &path, const QByteArray &dirname)
else if (S_ISDIR(statbuf.st_mode)) //folder
{
Folder *d = nullptr;
QByteArray new_dirname = ent->d_name;
const QByteArray new_dirname = ent->d_name + QByteArrayLiteral("/");
new_path += '/';
//check to see if we've scanned this section already
......@@ -221,7 +221,7 @@ LocalLister::scan(const QByteArray &path, const QByteArray &dirname)
}
if (!d) //then scan
if ((d = scan(new_path, new_dirname + '/'))) //then scan was successful
if ((d = scan(new_path, new_dirname))) //then scan was successful
cwd->append(d);
}
......
Markdown is supported
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