From dcbd90925af0246dddd641a6a4cc94cb344ee4c3 Mon Sep 17 00:00:00 2001 From: Zheng Yongjun Date: Mon, 24 Jan 2022 15:48:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=E5=8A=A8=E6=80=81=E7=94=A8?= =?UTF-8?q?=E6=88=B7ID=E8=80=8C=E4=B8=8D=E6=98=AF=E5=86=99=E6=AD=BBID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Zheng Yongjun Change-Id: I07c01b6428ab8aa457351d0d23d9b5036febe12a --- src/appspawn_server.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) mode change 100644 => 100755 src/appspawn_server.cpp diff --git a/src/appspawn_server.cpp b/src/appspawn_server.cpp old mode 100644 new mode 100755 index 4807ae3e..60abdc14 --- a/src/appspawn_server.cpp +++ b/src/appspawn_server.cpp @@ -412,12 +412,13 @@ int32_t AppSpawnServer::DoAppSandboxMountOnce(const std::string originPath, cons int32_t AppSpawnServer::DoAppSandboxMount(const ClientSocket::AppProperty *appProperty, std::string rootPath) { + std::string currentUserId = std::to_string(appProperty->uid / 200000); std::string oriInstallPath = "/data/app/el1/bundle/"; - std::string oriDataPath = "/data/app/el2/0/base/"; - std::string oriDatabasePath = "/data/app/el2/0/database/"; + std::string oriDataPath = "/data/app/el2/" + currentUserId + "/base/"; + std::string oriDatabasePath = "/data/app/el2/" + currentUserId + "/database/"; std::string destAPI7InstallPath = rootPath + "/data/accounts/account_0/applications"; std::string destDatabasePath = rootPath + "/data/storage/el2/database"; - std::string destInstallPath = rootPath + "/data/storage/el1/0/bundle"; + std::string destInstallPath = rootPath + "/data/storage/el1/bundle"; std::string destDataPath = rootPath + "/data/storage/el2/base"; int rc = 0; @@ -452,9 +453,9 @@ void AppSpawnServer::DoAppSandboxMkdir(std::string sandboxPackagePath, const Cli mkdir(dirPath.c_str(), FILE_MODE); dirPath = sandboxPackagePath + "/data/storage/el1"; mkdir(dirPath.c_str(), FILE_MODE); - dirPath = sandboxPackagePath + "/data/storage/el1/0"; + dirPath = sandboxPackagePath + "/data/storage/el1"; mkdir(dirPath.c_str(), FILE_MODE); - dirPath = sandboxPackagePath + "/data/storage/el1/0/bundle"; + dirPath = sandboxPackagePath + "/data/storage/el1/bundle"; mkdir(dirPath.c_str(), FILE_MODE); // to create /mnt/sandbox//data/storage/el1 related path, later should delete this code. -- Gitee