Commit 0824365b authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Simplify logic of file reading

parent 3b387830
......@@ -361,12 +361,9 @@ KVersionControlPlugin::ItemVersion FileViewHgPlugin::itemVersion(const KFileItem
// will disable the context menu there. Will enable recursive
// add however.
QDir dir(item.localPath());
const QStringList filesInside = dir.entryList();
const QStringList filesInside = dir.entryList(QDir::AllEntries | QDir::NoDotAndDotDot);
for (const QString &fileName : filesInside) {
if (fileName == "." || fileName == ".." ) {
continue;
}
QUrl tempUrl(dir.absoluteFilePath(fileName));
const QUrl tempUrl(dir.absoluteFilePath(fileName));
KFileItem tempFileItem(tempUrl);
if (itemVersion(tempFileItem) == NormalVersion) {
return NormalVersion;
......
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