This instance will be upgraded to Heptapod 0.20.1 on 2020-03-08 at 14:00 UTC+1 (10 minutes of downtime)

Commit c2fc62e5 authored by Tijl Coosemans's avatar Tijl Coosemans

Consistently convert filesystem paths to/from Local8Bit

parent b20aab5bb443
......@@ -79,13 +79,13 @@ QByteArray Block::preferredDevice() const
{
if(labels.empty())
return device();
return (QStringLiteral("/dev/") + labels[0]).toLatin1();
return (QStringLiteral("/dev/") + labels[0]).toLocal8Bit();
}
QByteArray Block::device() const
{
return (QStringLiteral("/dev/") + name).toLatin1();
return (QStringLiteral("/dev/") + name).toLocal8Bit();
}
......
......@@ -189,7 +189,7 @@ QString BlockFilesystem::Mount(const QVariantMap& options)
if(filesystem == "zfs")
mountPoints << zfsMountpoint.toLocal8Bit();
else
mountPoints << mountPoint.toUtf8();
mountPoints << mountPoint.toLocal8Bit();
signalMountPointsChanged();
......@@ -247,14 +247,14 @@ void BlockFilesystem::Unmount(const QVariantMap& options)
if(!it.value().isNull())
args << it.value().toString();
}
args << QString::fromUtf8(*mp);
args << QString::fromLocal8Bit(*mp);
umount.start(QStringLiteral("/sbin/umount"), args);
umount.waitForFinished(-1);
if(umount.exitCode() == 0)
{
removeMountPoint(*mp, /*checkIfEmpty = */ true);
removeMountPoint(QString::fromLocal8Bit(*mp), /*checkIfEmpty = */ true);
mountPoints.erase(mp);
}
else
......
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