namespace Tizen { namespace Content
{
-static const wchar_t CONTENT_DOWNLOAD_TEMP_DIRECTORY[] = L"/tmp/content/";
-static const wchar_t CONTENT_DOWNLOAD_TEMP_FILE_PATH[] = L"/tmp/content/downloadtempfile";
+static const wchar_t CONTENT_DOWNLOAD_TEMP_DIRECTORY[] = L"/tmp/content_";
static const wchar_t CONTENT_DOWNLOAD_PATH_MEDIA[] = L"/Media";
static const wchar_t CONTENT_DOWNLOAD_PATH_MEDIA_MMC[] = L"/Storagecard/Media";
static const wchar_t CONTENT_DOWNLOAD_PATH_HOME[] = L"/Home";
pUserData->SetCheckDownloading(i, false);
}
+ String appId = _AppInfo::GetApplicationId();
+ r = tempPath.Append(appId);
+ SysTryReturnVoidResult(NID_CNT, !IsFailed(r), r, "[E_INVALID_ARG] Failed to perform Append operation.");
+
// not exist
check = _FileImpl::IsFileExist(tempPath);
r = GetLastResult();
ClearLastResult();
result r = E_SUCCESS;
- String tempFilePath(CONTENT_DOWNLOAD_TEMP_FILE_PATH);
String sourcePath(L"");
String scheme(L"");
long long ticks = 0;
SysTryReturn(NID_CNT, !IsFailed(r), r = E_INVALID_STATE, E_INVALID_STATE,
"[E_INVALID_STATE] Failed to perform GetTicks operation.");
+ String tempFilePath(CONTENT_DOWNLOAD_TEMP_DIRECTORY);
+ r = tempFilePath.Append(_AppInfo::GetApplicationId());
+ SysTryReturn(NID_CNT, !IsFailed(r), r = E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Failed to perform Append operation.");
+
+ r = tempFilePath.Append(L"/downloadtempfile");
+ SysTryReturn(NID_CNT, !IsFailed(r), r = E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Failed to perform Append operation.");
+
r = tempFilePath.Append(ticks);
SysTryReturn(NID_CNT, !IsFailed(r), r = E_INVALID_STATE, E_INVALID_STATE,
"[E_INVALID_STATE] Failed to append long long type to temporary file path.");
ClearLastResult();
result r = E_SUCCESS;
String srcFilePath(L"");
- String tempDestFilePath(CONTENT_DOWNLOAD_TEMP_FILE_PATH);
String scheme(L"");
long long ticks = 0;
r = _SystemTimeImpl::GetTicks(ticks);
SysTryReturn(NID_CNT, !IsFailed(r), r, r, "[%s] Failed to perform GetTicks operation.", GetErrorMessage(r));
+ String tempDestFilePath(CONTENT_DOWNLOAD_TEMP_DIRECTORY);
+ r = tempDestFilePath.Append(_AppInfo::GetApplicationId());
+ SysTryReturn(NID_CNT, !IsFailed(r), r = E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Failed to perform Append operation.");
+
+ r = tempDestFilePath.Append(L"/downloadtempfile");
+ SysTryReturn(NID_CNT, !IsFailed(r), r = E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Failed to perform Append operation.");
+
r = tempDestFilePath.Append(ticks);
SysTryReturn(NID_CNT, !IsFailed(r), r, r, "[%s] Failed to append long long type to temporary file path.", GetErrorMessage(r));