Commit 3c080fc4 authored by Raphael Kubo da Costa's avatar Raphael Kubo da Costa
Browse files

Do not store empty entries created by removing "./" from the beginning

of an entry that consisted only of "./".

BUG: 194643

svn path=/trunk/KDE/kdeutils/ark/; revision=976549
parent 18c0253a
......@@ -721,10 +721,15 @@ void ArchiveModel::newEntry(const ArchiveEntry& receivedEntry, InsertBehaviour b
ArchiveEntry entry = receivedEntry;
//#194241: Filenames such as "./file" should be displayed as "file"
if (entry[FileName].toString().startsWith("./")) {
QString entryFileName( entry[FileName].toString() );
if (entryFileName.startsWith("./")) {
if (entryFileName == "./") // Stop here, this would create an empty entry
if (!entry.contains(InternalID))
kDebug(1601) << "Warning, there is no internalID";
entry[FileName] = entry[FileName].toString().remove(0, 2);
entry[FileName] = entryFileName.remove(0, 2);
/// 1. Skip already created nodes
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