Modify virtual root
authorHyunbin Lee <hyunbin.lee@samsung.com>
Mon, 15 Jul 2013 05:44:23 +0000 (14:44 +0900)
committerHyunbin Lee <hyunbin.lee@samsung.com>
Wed, 14 Aug 2013 06:21:47 +0000 (15:21 +0900)
Change-Id: I48f23eded16b629b3b87005ba684dff6c541376e
Signed-off-by: Hyunbin Lee <hyunbin.lee@samsung.com>
src/FIo_MmcStorageManagerService.cpp

index 10659ca..a3de0b1 100644 (file)
@@ -354,8 +354,22 @@ _MmcStorageManagerService::MmcEventVconfCallback(keynode_t* node, void* userData
                                std::unique_ptr< char[] > pAppRootPath(_StringConverter::CopyToCharArrayN(*pAppRoot));
                                SysTryReturnVoidResult(NID_IO, pAppRootPath != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
 
+                               String infoPath(*pAppRoot);
+                               infoPath.Append(L"/info/virtualroot.info");
+
+                               File file;
+                               r = file.Construct(infoPath, "r");
+                               SysTryReturnVoidResult(NID_IO, !IsFailed(r), E_SYSTEM, "[%s] Failed to open %ls", GetErrorMessage(r), infoPath.GetPointer());
+
+                               String userPath;
+                               r = file.Read(userPath);
+                               SysTryReturnVoidResult(NID_IO, !IsFailed(r), E_SYSTEM, "[%s] Failed to read %ls", GetErrorMessage(r), infoPath.GetPointer());
+                               SysLog(NID_IO, "user path: %ls", userPath.GetPointer());
+
                                String destPath(*pAppRoot);
-                               destPath.Append(L"/virtual-root/opt/storage/sdcard");
+                               destPath.Append(L"/data/");
+                               destPath.Append(userPath);
+                               destPath.Append(L"/opt/storage/sdcard");
 
                                std::unique_ptr< char[] > pDestPath(_StringConverter::CopyToCharArrayN(destPath));
                                SysTryReturnVoidResult(NID_IO, pDestPath != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");