Don't return /data/data from BuildDataUserCePath() am: aafc1bfb73
am: 50cfdadab0
am: e515951101
am: af5e9ca469
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2095483 Change-Id: I6796d564a245da1008532df086c6dbcf41b7bab3 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
a7815b6ce4
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) {
|
std::string BuildDataUserCePath(const std::string& volumeUuid, userid_t userId) {
|
||||||
// TODO: unify with installd path generation logic
|
// TODO: unify with installd path generation logic
|
||||||
std::string data(BuildDataPath(volumeUuid));
|
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);
|
return StringPrintf("%s/user/%u", data.c_str(), userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue