Changeset View
Changeset View
Standalone View
Standalone View
src/core/directorysizejob.cpp
Show First 20 Lines • Show All 152 Lines • ▼ Show 20 Line(s) | 150 | if (device) { | |||
---|---|---|---|---|---|
153 | QSet<long> &visitedInodes = m_visitedInodes[device]; // find or insert | 153 | QSet<long> &visitedInodes = m_visitedInodes[device]; // find or insert | ||
154 | if (visitedInodes.contains(inode)) { | 154 | if (visitedInodes.contains(inode)) { | ||
155 | continue; | 155 | continue; | ||
156 | } | 156 | } | ||
157 | visitedInodes.insert(inode); | 157 | visitedInodes.insert(inode); | ||
158 | } | 158 | } | ||
159 | const KIO::filesize_t size = entry.numberValue(KIO::UDSEntry::UDS_SIZE, 0); | 159 | const KIO::filesize_t size = entry.numberValue(KIO::UDSEntry::UDS_SIZE, 0); | ||
160 | const QString name = entry.stringValue(KIO::UDSEntry::UDS_NAME); | 160 | const QString name = entry.stringValue(KIO::UDSEntry::UDS_NAME); | ||
161 | if (name == QLatin1String(".")) { | 161 | if (name != QLatin1String("..") && name != QLatin1String(".")) { | ||
162 | m_totalSize += size; | 162 | if (!entry.isLink() && !entry.isDir()) { | ||
163 | //qDebug() << "'.': added" << size << "->" << m_totalSize; | | |||
164 | } else if (name != QLatin1String("..")) { | | |||
165 | if (!entry.isLink()) { | | |||
166 | m_totalSize += size; | 163 | m_totalSize += size; | ||
167 | } | 164 | } | ||
168 | if (!entry.isDir()) { | 165 | if (!entry.isDir()) { | ||
169 | m_totalFiles++; | 166 | m_totalFiles++; | ||
170 | } else { | 167 | } else { | ||
171 | m_totalSubdirs++; | 168 | m_totalSubdirs++; | ||
172 | } | 169 | } | ||
173 | //qDebug() << name << ":" << size << "->" << m_totalSize; | 170 | //qDebug() << name << ":" << size << "->" << m_totalSize; | ||
Show All 33 Lines |