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.");