TryCatch(r == E_SUCCESS,,"copy file failed");
percentage = percentage + count;
+ long long int x = percentageComplete;
+
+
percentageComplete = (percentage * 100) / (toatalsize);
- AppLogDebug("precentage result %lld %lld",percentageComplete,percentage);
-
- __fileManagingingResult = FILE_MANAGING_RESULT_CURRENT_STATUS;
- pArg = new (std::nothrow) ArrayList();
- pArg->Construct();
- pFileManagingResult = new (std::nothrow) Integer(__fileManagingingResult);
- pFileManagedCounter = new (std::nothrow) Integer(__fileManagedCounter);
- pTotalFileCount = new (std::nothrow) Integer(__pListOfFiles->GetCount());
- pPercentageCompletion = new (std::nothrow)Integer(percentageComplete);
- pArg->Add(pFileManagingResult);
- pArg->Add(pFileManagedCounter);
- pArg->Add(pTotalFileCount);
- pArg->Add(pPercentageCompletion);
- Application::GetInstance()->SendUserEvent(ID_COPY_COMPLETE, pArg);
+
+ if(x != percentageComplete)
+ {
+ AppLogDebug("precentage result %lld %lld",percentageComplete,percentage);
+ __fileManagingingResult = FILE_MANAGING_RESULT_CURRENT_STATUS;
+ pArg = new (std::nothrow) ArrayList();
+ pArg->Construct();
+ pFileManagingResult = new (std::nothrow) Integer(__fileManagingingResult);
+ pFileManagedCounter = new (std::nothrow) Integer(__fileManagedCounter);
+ pTotalFileCount = new (std::nothrow) Integer(__pListOfFiles->GetCount());
+ pPercentageCompletion = new (std::nothrow)Integer(percentageComplete);
+ pArg->Add(pFileManagingResult);
+ pArg->Add(pFileManagedCounter);
+ pArg->Add(pTotalFileCount);
+ pArg->Add(pPercentageCompletion);
+ Application::GetInstance()->SendUserEvent(ID_COPY_COMPLETE, pArg);
+ }
count = sourceFIle.Read(byteToWrite, BUFFER_SIZE_MAX);
}