summaryrefslogtreecommitdiffstats
path: root/media/mtp/MtpStorage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'media/mtp/MtpStorage.cpp')
-rw-r--r--media/mtp/MtpStorage.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/media/mtp/MtpStorage.cpp b/media/mtp/MtpStorage.cpp
index 2fbbc51..6cb88b3 100644
--- a/media/mtp/MtpStorage.cpp
+++ b/media/mtp/MtpStorage.cpp
@@ -59,7 +59,7 @@ int MtpStorage::getAccessCapability() const {
uint64_t MtpStorage::getMaxCapacity() {
if (mMaxCapacity == 0) {
struct statfs stat;
- if (statfs(mFilePath, &stat))
+ if (statfs(getPath(), &stat))
return -1;
mMaxCapacity = (uint64_t)stat.f_blocks * (uint64_t)stat.f_bsize;
}
@@ -68,7 +68,7 @@ uint64_t MtpStorage::getMaxCapacity() {
uint64_t MtpStorage::getFreeSpace() {
struct statfs stat;
- if (statfs(mFilePath, &stat))
+ if (statfs(getPath(), &stat))
return -1;
uint64_t freeSpace = (uint64_t)stat.f_bavail * (uint64_t)stat.f_bsize;
return (freeSpace > mReserveSpace ? freeSpace - mReserveSpace : 0);