diff options
author | Brian Carlstrom <bdc@google.com> | 2014-04-28 22:10:01 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-04-28 22:10:01 +0000 |
commit | aaa22fd38c1d2ad1707f8178019196d7d612dd72 (patch) | |
tree | a4ad8e431cbca1f39cdcb158d4cf9273067d0837 /cmds | |
parent | 498b4a0950f8d613b0ba6cb2e393a0fef2bfd6a7 (diff) | |
parent | 58ea37fe26fc733db478e606374f08d8a9d070cc (diff) | |
download | frameworks_native-aaa22fd38c1d2ad1707f8178019196d7d612dd72.zip frameworks_native-aaa22fd38c1d2ad1707f8178019196d7d612dd72.tar.gz frameworks_native-aaa22fd38c1d2ad1707f8178019196d7d612dd72.tar.bz2 |
am 58ea37fe: am 108ed9fa: Merge "Fix incorrect odex path handling"
* commit '58ea37fe26fc733db478e606374f08d8a9d070cc':
Fix incorrect odex path handling
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/installd/commands.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c index 669f403..a86abe1 100644 --- a/cmds/installd/commands.c +++ b/cmds/installd/commands.c @@ -685,9 +685,13 @@ int dexopt(const char *apk_path, uid_t uid, int is_public, /* Before anything else: is there a .odex file? If so, we have * precompiled the apk and there is nothing to do here. */ - sprintf(out_path, "%s%s", apk_path, ".odex"); - if (stat(out_path, &dex_stat) == 0) { - return 0; + strcpy(out_path, apk_path); + end = strrchr(out_path, '.'); + if (end != NULL) { + strcpy(end, ".odex"); + if (stat(out_path, &dex_stat) == 0) { + return 0; + } } if (create_cache_path(out_path, apk_path)) { |