Don't return /data/data from BuildDataUserCePath() am: aafc1bfb73
am: 50cfdadab0
am: e515951101
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2095483 Change-Id: Ia19d6556ce520e0a8364001de8bb4314f339241e Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
af5e9ca469
1 changed files with 0 additions and 8 deletions
|
@ -1160,14 +1160,6 @@ std::string BuildDataMiscDePath(const std::string& volumeUuid, userid_t userId)
|
|||
std::string BuildDataUserCePath(const std::string& volumeUuid, userid_t userId) {
|
||||
// TODO: unify with installd path generation logic
|
||||
std::string data(BuildDataPath(volumeUuid));
|
||||
if (volumeUuid.empty() && userId == 0) {
|
||||
std::string legacy = StringPrintf("%s/data", data.c_str());
|
||||
struct stat sb;
|
||||
if (lstat(legacy.c_str(), &sb) == 0 && S_ISDIR(sb.st_mode)) {
|
||||
/* /data/data is dir, return /data/data for legacy system */
|
||||
return legacy;
|
||||
}
|
||||
}
|
||||
return StringPrintf("%s/user/%u", data.c_str(), userId);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue