NABI_Se issues resolved
[apps/osp/MyFiles.git] / src / MfFileManageWorkerThread.cpp
index bd9b181..31e3513 100644 (file)
@@ -1976,22 +1976,28 @@ FileManageWorkerThread::Copy(Tizen::Base::String& sourcePath, Tizen::Base::Strin
                        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);
                }