summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
Diffstat (limited to 'cmds')
-rw-r--r--cmds/installd/commands.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c
index 654ee68..b8ba3f6 100644
--- a/cmds/installd/commands.c
+++ b/cmds/installd/commands.c
@@ -389,9 +389,10 @@ int get_size(const char *pkgname, const char *apkpath,
int cachesize = 0;
/* count the source apk as code -- but only if it's not
- * on the /system partition
+ * on the /system partition and its not on the sdcard.
*/
- if (strncmp(apkpath, "/system", 7) != 0) {
+ if (strncmp(apkpath, "/system", 7) != 0 &&
+ strncmp(apkpath, SDCARD_DIR_PREFIX, 7) != 0) {
if (stat(apkpath, &s) == 0) {
codesize += stat_size(&s);
}
@@ -403,17 +404,6 @@ int get_size(const char *pkgname, const char *apkpath,
codesize += stat_size(&s);
}
}
-
- /* count the source apk as code -- but only if it's not
- * installed on the sdcard
- */
- if (strncmp(apkpath, SDCARD_DIR_PREFIX, 7) != 0) {
- if (stat(apkpath, &s) == 0) {
- codesize += stat_size(&s);
- }
- }
-
-
/* count the cached dexfile as code */
if (!create_cache_path(path, apkpath)) {
if (stat(path, &s) == 0) {