diff options
author | JP Abgrall <jpa@google.com> | 2014-02-14 17:31:40 -0800 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2014-04-07 15:31:44 -0700 |
commit | ce52b565b92240bfdd24f27f5e914586eca0fe0c (patch) | |
tree | 2b50c8b1425ec3510db3ab17d2038757b523595d | |
parent | 513d66f4984c4e38e9a3179956d0b2f59db3e710 (diff) | |
download | android_system_extras-stable/cm-11.0-XNF8Y.tar.gz android_system_extras-stable/cm-11.0-XNF8Y.tar.bz2 android_system_extras-stable/cm-11.0-XNF8Y.zip |
ext4_utils: don't leave bad image file in case of errorcm-11.0-XNPH44S-bacon-5fa8c79c0bcm-11.0-XNPH33R-bacon-3628510d76cm-11.0-XNPH30O-bacon-4f280f505acm-11.0-XNPH25R-bacon-d22b777afacm-11.0-XNPH22R-bacon-03d77315eacm-11.0-XNPH05Q-tomato-9828f8e9cccm-11.0-XNPH05Q-bacon-5229c4ef56stable/cm-11.0-XNF9Xstable/cm-11.0-XNF8Ystable/cm-11.0shipping/cm-11.0
Bug: 13029951
Change-Id: Ibe50a503c2d3988813b362790b7fba83383fb51e
-rw-r--r-- | ext4_utils/make_ext4fs_main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext4_utils/make_ext4fs_main.c b/ext4_utils/make_ext4fs_main.c index b6c740d2..754e51f0 100644 --- a/ext4_utils/make_ext4fs_main.c +++ b/ext4_utils/make_ext4fs_main.c @@ -203,6 +203,7 @@ int main(int argc, char **argv) exitcode = make_ext4fs_internal(fd, directory, mountpoint, fs_config_func, gzip, sparse, crc, wipe, sehnd, verbose); close(fd); - + if (exitcode && strcmp(filename, "-")) + unlink(filename); return exitcode; } |