commit | 7454265b6faeb72a53287c94be6742f46bc4ae12 | [log] [tgz] |
---|---|---|
author | Alex Deymo <deymo@google.com> | Thu Oct 15 16:23:44 2015 -0700 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Fri Oct 16 01:15:27 2015 +0000 |
tree | f0d5b3b1bf3ca17d992709a5092f0f3c6732d09d | |
parent | f22a39afd3245851ace565b3ad57c1c26b68721d [diff] |
Don't attempt to create prefs directory if already exists. base::CreateDirectory() will attempt to create all the parent directories checking first if they exist starting from /. We might not have permission to access those higher directories which is not a critical error, but will print misleading SELinux errors. This patch prevents that case by checking first if the directory exists. A one-time error message will be shown the first time the device creates the prefs/ directory. Bug: None Test: Unittest still pass. Dragonboard build doesn't print these errors. Change-Id: I061686e540472128ba67021556adde9b1e998c08