Fix app ni path for readonly app (#389) accepted/tizen/unified/20220223.132451 submit/tizen/20220223.002542
author이형주/Common Platform Lab(SR)/삼성전자 <leee.lee@samsung.com>
Wed, 23 Feb 2022 00:21:35 +0000 (09:21 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Wed, 23 Feb 2022 00:21:35 +0000 (09:21 +0900)
There was a bug in setting the app ni path when RO installed app was updated.
To fix this bug, check root path whether read-only area or not.

Co-authored-by: Woongsuk Cho <ws77.cho@samsung.com>
NativeLauncher/util/path_manager.cc

index 664da52..a91cad6 100644 (file)
@@ -160,7 +160,7 @@ void PathManager::setAppRootPath(const std::string& rootPath)
 
        // check readonly update directory eixst or not
        std::string niRootPath = replaceAll(appRootPath, getBaseName(appRootPath), __READ_ONLY_APP_UPDATE_DIR);
-       if (isDirectory(niRootPath)) {
+       if (isReadOnlyArea(appRootPath) && isDirectory(niRootPath)) {
                appNIRootPath = getAbsolutePath(niRootPath);
        } else {
                appNIRootPath = appRootPath;