Bug 1001948 - Attempt to remove the files again if ERROR_DIR_NOT_EMPTY is thrown. r=tabraldes
authorMarco Castelluccio <mar.castelluccio@studenti.unina.it>
Thu, 10 Jul 2014 19:46:27 +0200
changeset 214205 225f2cba1982b4c17974348c3c8b01988cbb03dc
parent 214204 315da0e3c1b499d2dc6c5c3f5f598bc83e9c98dc
child 214206 c3100f4255d1e60ec477a357295a0d268ad53ba2
push id3857
push userraliiev@mozilla.com
push dateTue, 02 Sep 2014 16:39:23 +0000
treeherdermozilla-beta@5638b907b505 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstabraldes
bugs1001948
milestone33.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1001948 - Attempt to remove the files again if ERROR_DIR_NOT_EMPTY is thrown. r=tabraldes
toolkit/webapps/tests/head.js
--- a/toolkit/webapps/tests/head.js
+++ b/toolkit/webapps/tests/head.js
@@ -262,17 +262,18 @@ function TestAppInfo(aApp, aIsPackaged) 
           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",