Commit 6d034809 authored by Thomas Perl's avatar Thomas Perl

[diskusage] Allow measuring /data/media/ usage via /home/

parent af830ad8
......@@ -65,6 +65,14 @@ static quint64 calculateSize(QString directory, QString *expandedPath)
*expandedPath = directory;
}
// "/data/media/" is mounted in "/home/nemo/android_storage/" with read
// access for the "nemo" user ("/data/media/" itself isn't readable);
// Mounted via FUSE and /system/bin/sdcard, see here:
// https://source.android.com/devices/storage/config.html
if (directory == "/data/media/") {
directory = "/home/nemo/android_storage/";
}
QDir d(directory);
if (!d.exists() || !d.isReadable()) {
return 0L;
......
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