Bug 517102 - App update slow, progressbar works poorly on Windows CE. (Part 1, Logging cleanup) r=robstrong
authorJustin Dolske <dolske@mozilla.com>
Tue, 06 Oct 2009 16:39:51 -0700
changeset 33520 d9bee5b4a68f2e9969351397b5febdd286d618bb
parent 33519 15f6b7d23ada281a6aeb6d9ed551c2ad5a33864a
child 33521 95f927ddb0e348fa0dfe71af54193ce5fc38247f
push idunknown
push userunknown
push dateunknown
reviewersrobstrong
bugs517102
milestone1.9.3a1pre
Bug 517102 - App update slow, progressbar works poorly on Windows CE. (Part 1, Logging cleanup) r=robstrong
toolkit/mozapps/update/src/updater/updater.cpp
--- a/toolkit/mozapps/update/src/updater/updater.cpp
+++ b/toolkit/mozapps/update/src/updater/updater.cpp
@@ -669,17 +669,17 @@ RemoveFile::Parse(char *line)
 int
 RemoveFile::Prepare()
 {
   LOG(("PREPARE REMOVE " LOG_S "\n", mDestFile));
 
   // We expect the file to exist if we are to remove it.
   int rv = NS_taccess(mDestFile, F_OK);
   if (rv) {
-    LOG(("file cannot be removed because it does not exist; skipping\n"));
+    LOG(("file does not exist; skipping\n"));
     mSkip = 1;
     return OK;
   }
 
 #ifndef WINCE
   NS_tchar *slash = (NS_tchar *) NS_tstrrchr(mDestFile, NS_T('/'));
   if (slash) {
     *slash = NS_T('\0');
@@ -696,21 +696,21 @@ RemoveFile::Prepare()
 #endif
 
   return OK;
 }
 
 int
 RemoveFile::Execute()
 {
-  LOG(("EXECUTE REMOVE " LOG_S "\n", mDestFile));
-
   if (mSkip)
     return OK;
 
+  LOG(("EXECUTE REMOVE " LOG_S "\n", mDestFile));
+
   // We expect the file to exist if we are to remove it.  We check here as well
   // as in PREPARE since we might have been asked to remove the same file more
   // than once: bug 311099.
   int rv = NS_taccess(mDestFile, F_OK);
   if (rv) {
     LOG(("file cannot be removed because it does not exist; skipping\n"));
     mSkip = 1;
     return OK;
@@ -730,21 +730,21 @@ RemoveFile::Execute()
     return WRITE_ERROR;
 
   return OK;
 }
 
 void
 RemoveFile::Finish(int status)
 {
-  LOG(("FINISH REMOVE " LOG_S "\n", mDestFile));
-
   if (mSkip)
     return;
 
+  LOG(("FINISH REMOVE " LOG_S "\n", mDestFile));
+
   backup_finish(mDestFile, status);
 }
 
 class AddFile : public Action
 {
 public:
   AddFile() : mFile(NULL), mDestFile(NULL) { }