summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2013-11-14 02:21:55 +0100
committerGravatar Martin Szulecki2013-11-14 02:21:55 +0100
commit2eb90fedeb614e088b280603fa492b2989e55920 (patch)
treec4b77bfafaaf3a621adb8ae02ebcb55c06ff8e97
parent958a48723ff7aa84c43a5266c0809e6d373a1903 (diff)
downloadideviceinstaller-2eb90fedeb614e088b280603fa492b2989e55920.tar.gz
ideviceinstaller-2eb90fedeb614e088b280603fa492b2989e55920.tar.bz2
Turn "could not locate foo" message into a warning instead of confusing users
-rw-r--r--src/ideviceinstaller.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ideviceinstaller.c b/src/ideviceinstaller.c
index 7d10e75..671b6fb 100644
--- a/src/ideviceinstaller.c
+++ b/src/ideviceinstaller.c
@@ -145,7 +145,6 @@ static int zip_get_contents(struct zip *zf, const char *filename, int locate_fla
145 *len = 0; 145 *len = 0;
146 146
147 if (zindex < 0) { 147 if (zindex < 0) {
148 fprintf(stderr, "ERROR: could not locate %s in archive!\n", filename);
149 return -1; 148 return -1;
150 } 149 }
151 150
@@ -816,6 +815,8 @@ run_again:
816 } else { 815 } else {
817 plist_from_xml(zbuf, len, &meta_dict); 816 plist_from_xml(zbuf, len, &meta_dict);
818 } 817 }
818 } else {
819 fprintf(stderr, "WARNING: could not locate %s in archive!\n", ITUNES_METADATA_PLIST_FILENAME);
819 } 820 }
820 if (zbuf) { 821 if (zbuf) {
821 free(zbuf); 822 free(zbuf);
@@ -841,6 +842,7 @@ run_again:
841 strcat(filename, "Info.plist"); 842 strcat(filename, "Info.plist");
842 843
843 if (zip_get_contents(zf, filename, 0, &zbuf, &len) < 0) { 844 if (zip_get_contents(zf, filename, 0, &zbuf, &len) < 0) {
845 fprintf(stderr, "WARNING: could not locate %s in archive!\n", filename);
844 zip_unchange_all(zf); 846 zip_unchange_all(zf);
845 zip_close(zf); 847 zip_close(zf);
846 goto leave_cleanup; 848 goto leave_cleanup;
@@ -894,6 +896,8 @@ run_again:
894 len = 0; 896 len = 0;
895 if (zip_get_contents(zf, sinfname, 0, &zbuf, &len) == 0) { 897 if (zip_get_contents(zf, sinfname, 0, &zbuf, &len) == 0) {
896 sinf = plist_new_data(zbuf, len); 898 sinf = plist_new_data(zbuf, len);
899 } else {
900 fprintf(stderr, "WARNING: could not locate %s in archive!\n", sinfname);
897 } 901 }
898 free(sinfname); 902 free(sinfname);
899 if (zbuf) { 903 if (zbuf) {