diff --git a/OsmAnd/src/net/osmand/plus/activities/LocalIndexInfo.java b/OsmAnd/src/net/osmand/plus/activities/LocalIndexInfo.java index 1f6e5fa1d4..bd94e39c8d 100644 --- a/OsmAnd/src/net/osmand/plus/activities/LocalIndexInfo.java +++ b/OsmAnd/src/net/osmand/plus/activities/LocalIndexInfo.java @@ -33,7 +33,7 @@ public class LocalIndexInfo { this.type = type; singleFile = !f.isDirectory(); if (singleFile) { - kbSize = (int) (f.length() >> 10); + kbSize = (int) ((f.length() + 512) >> 10); } this.backupedData = backuped; } diff --git a/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java b/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java index 1454d8d62f..cfa790882d 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java @@ -1249,7 +1249,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { if (file == null) { return -1; } - sz = (int) (file.length() >> 10); + sz = (int) ((file.length() + 512) >> 10); } return sz; }