diff options
author | Duyoung Jang <duyoung.jang@samsung.com> | 2013-01-25 18:47:38 +0900 |
---|---|---|
committer | Duyoung Jang <duyoung.jang@samsung.com> | 2013-01-25 18:47:38 +0900 |
commit | 96f87a3b5d51cbc21fddee596fc7c01ccb3508b1 (patch) | |
tree | 97842cb1a263188129c030ea4f08b340e5f48f33 | |
parent | 636b02ecfd5626250dc713f1f50b1e777805bb98 (diff) | |
download | installer-96f87a3b5d51cbc21fddee596fc7c01ccb3508b1.tar.gz installer-96f87a3b5d51cbc21fddee596fc7c01ccb3508b1.tar.bz2 installer-96f87a3b5d51cbc21fddee596fc7c01ccb3508b1.zip |
Change directory for app2sd
Change-Id: If3797ff34ea5357b7ec84df91122b8cecfffc77a
Signed-off-by: Duyoung Jang <duyoung.jang@samsung.com>
-rwxr-xr-x | inc/InstallerDefs.h | 2 | ||||
-rwxr-xr-x | src/Manager/InstallerManager.cpp | 20 |
2 files changed, 15 insertions, 7 deletions
diff --git a/inc/InstallerDefs.h b/inc/InstallerDefs.h index 4f7dae8..9320f83 100755 --- a/inc/InstallerDefs.h +++ b/inc/InstallerDefs.h @@ -21,7 +21,7 @@ #ifndef _INSTALLER_DEFS_H_ #define _INSTALLER_DEFS_H_ -#define OSP_INSTALLER_VERSION "osp-installer version = 20130124.2" +#define OSP_INSTALLER_VERSION "osp-installer version = 20130125.1" #define DIR_BIN L"/bin" #define DIR_INFO L"/info" diff --git a/src/Manager/InstallerManager.cpp b/src/Manager/InstallerManager.cpp index 6b2d3db..7ecc530 100755 --- a/src/Manager/InstallerManager.cpp +++ b/src/Manager/InstallerManager.cpp @@ -594,9 +594,9 @@ InstallerManager::RequestMove(const PackageId& packageId, int moveType) DirEntry entry = pDirEnum->GetCurrentDirEntry(); String entryName = entry.GetName(); - String rootDirectory = rootPath; - rootDirectory += L"/"; - rootDirectory += entryName; + //String rootDirectory = rootPath; + //rootDirectory += L"/"; + //rootDirectory += entryName; if (entryName == L"." || entryName == L"..") { @@ -609,15 +609,15 @@ InstallerManager::RequestMove(const PackageId& packageId, int moveType) pDirDetails = (app2ext_dir_details*) calloc(1, sizeof(app2ext_dir_details)); TryCatch(pDirDetails, errorType = INSTALLER_ERROR_INTERNAL_STATE, "pDirDetails is null"); - length = rootDirectory.GetLength(); + length = entryName.GetLength(); pDirDetails->name = (char*) calloc(1, (sizeof(char) * length) + 1); - snprintf(pDirDetails->name, length + 1, "%ls", rootDirectory.GetPointer()); + snprintf(pDirDetails->name, length + 1, "%ls", entryName.GetPointer()); String bin(L"bin"); String res(L"res"); String icons(L"icons"); - if (rootDirectory.Contains(bin) || rootDirectory.Contains(res) || rootDirectory.Contains(icons)) + if (entryName.Contains(bin) || entryName.Contains(res) || entryName.Contains(icons)) { pDirDetails->type = APP2EXT_DIR_RO; } @@ -821,6 +821,14 @@ InstallerManager::ReqeustByTest(void) { errorType = RequestRecursiveDirectory(path, errorType); } + else if (readBuf[0] == '>') + { + errorType = RequestMove(path, PM_MOVE_TO_SDCARD); + } + else if (readBuf[0] == '<') + { + errorType = RequestMove(path, PM_MOVE_TO_INTERNAL); + } } CATCH: |