diff options
-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: |