Bug 1001948 - Attempt to remove the files again if ERROR_DIR_NOT_EMPTY is thrown. r=tabraldes, a=test-only
authorMarco Castelluccio <mar.castelluccio@studenti.unina.it>
Thu, 10 Jul 2014 19:46:27 +0200
changeset 208917 8e992de2080ce08f303cb8bad65b88b8728db8d6
parent 208916 8e6f4ec8b715d4683dee169e79713821aa788ca5
child 208918 5a30769e14ceba942bb00d51b907f83f698f4c5a
push id494
push userraliiev@mozilla.com
push dateMon, 25 Aug 2014 18:42:16 +0000
treeherdermozilla-release@a3cc3e46b571 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstabraldes, test-only
bugs1001948
milestone32.0a2
Bug 1001948 - Attempt to remove the files again if ERROR_DIR_NOT_EMPTY is thrown. r=tabraldes, a=test-only
toolkit/webapps/tests/head.js
--- a/toolkit/webapps/tests/head.js
+++ b/toolkit/webapps/tests/head.js
@@ -229,17 +229,18 @@ function TestAppInfo(aApp) {
           yield OS.File.removeDir(this.installPath, { ignoreAbsent: true });
 
           yield OS.File.remove(desktopShortcut, { ignoreAbsent: true });
           yield OS.File.remove(startMenuShortcut, { ignoreAbsent: true });
 
           removed = true;
         } catch (ex if ex instanceof OS.File.Error &&
                  (ex.winLastError == OS.Constants.Win.ERROR_ACCESS_DENIED ||
-                  ex.winLastError == OS.Constants.Win.ERROR_SHARING_VIOLATION)) {
+                  ex.winLastError == OS.Constants.Win.ERROR_SHARING_VIOLATION ||
+                  ex.winLastError == OS.Constants.Win.ERROR_DIR_NOT_EMPTY)) {
           // Wait 100 ms before attempting to remove again.
           yield wait(100);
         }
       } while (!removed);
     });
   } else if (MAC) {
     this.installPath = OS.Path.join(OS.Constants.Path.homeDir,
                                     "Applications",