Commit 10844941 authored by pvuorela's avatar pvuorela

Merge branch 'fix_du' into 'master'

Fix du usage with busybox, JB#49159

See merge request !27
parents 67e8e08b 18432e10
Name: nemo-qml-plugin-filemanager
Summary: File manager plugin for Nemo Mobile
Version: 0.1.14
Version: 0.1.21
Release: 1
Group: System/Libraries
License: BSD
......
......@@ -340,7 +340,7 @@ FileExtractionResult ArchiveModelPrivate::doExtractFile(const QString &entryName
return result;
}
qCDebug(lcArchiveLog) << "Extraing a file:" << targetPath;
qCDebug(lcArchiveLog) << "Extracting a file:" << targetPath;
bool extracted = false;
QString out;
......
......@@ -43,7 +43,6 @@
quint64 DiskUsageWorker::calculateSize(QString directory, QString *expandedPath, bool androidHomeExists)
{
// In lieu of wordexp(3) support in Qt, fake it
if (directory.startsWith("~/")) {
directory = QDir::homePath() + '/' + directory.mid(2);
......@@ -68,7 +67,7 @@ quint64 DiskUsageWorker::calculateSize(QString directory, QString *expandedPath,
}
QProcess du;
du.start("du", QStringList() << "-sbx" << directory, QIODevice::ReadOnly);
du.start("du", QStringList() << "-skx" << directory, QIODevice::ReadOnly);
du.waitForFinished();
if (du.exitStatus() != QProcess::NormalExit) {
qWarning() << "Could not determine size of:" << directory;
......@@ -77,7 +76,7 @@ quint64 DiskUsageWorker::calculateSize(QString directory, QString *expandedPath,
QStringList size_directory = QString::fromUtf8(du.readAll()).split('\t');
if (size_directory.size() > 1) {
return size_directory[0].toULongLong();
return size_directory[0].toULongLong() * 1024;
}
return 0L;
......
......@@ -208,7 +208,7 @@ public:
SelectedCountChanged = (1 << 13),
ContentChanged = (1 << 14),
};
Q_DECLARE_FLAGS(ChangedFlags, Changed);
Q_DECLARE_FLAGS(ChangedFlags, Changed)
private:
void recountSelectedFiles();
......
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