From aa1a31e83d25e6c3c3371063704eeb14558a595e Mon Sep 17 00:00:00 2001 From: Michael Runge Date: Fri, 25 Apr 2014 18:47:18 -0700 Subject: Allow lines without = signs. The new build.prop for Sprout includes lines of the format: import xxx.prop These can be safely ignored when reading the property file. Change-Id: Ia84a138e71461ffe8e591e88143b9787873def29 --- updater/install.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'updater/install.c') diff --git a/updater/install.c b/updater/install.c index 53f5e48cb..8defc7720 100644 --- a/updater/install.c +++ b/updater/install.c @@ -927,8 +927,8 @@ Value* GetPropFn(const char* name, State* state, int argc, Expr* argv[]) { // file_getprop(file, key) // // interprets 'file' as a getprop-style file (key=value pairs, one -// per line, # comment lines and blank lines okay), and returns the value -// for 'key' (or "" if it isn't defined). +// per line. # comment lines,blank lines, lines without '=' ignored), +// and returns the value for 'key' (or "" if it isn't defined). Value* FileGetPropFn(const char* name, State* state, int argc, Expr* argv[]) { char* result = NULL; char* buffer = NULL; @@ -986,9 +986,7 @@ Value* FileGetPropFn(const char* name, State* state, int argc, Expr* argv[]) { char* equal = strchr(line, '='); if (equal == NULL) { - ErrorAbort(state, "%s: malformed line \"%s\": %s not a prop file?", - name, line, filename); - goto done; + continue; } // trim whitespace between key and '=' -- cgit v1.2.3