From 18b0bb38e9001ffc7953ea1c2316b1b7b9be1237 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Thu, 29 Oct 2015 10:29:50 -0400 Subject: [PATCH] Fix EPERM issue when burning in Windows The issue is fixed by stopping the drive scanner interval before burning. --- build/browser/app.js | 5 +++++ lib/browser/app.js | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/build/browser/app.js b/build/browser/app.js index ce4f4be2..9ae3a111 100644 --- a/build/browser/app.js +++ b/build/browser/app.js @@ -69,6 +69,11 @@ app.controller('AppController', function($q, DriveScannerService, SelectionState }; this.burn = function(image, drive) { + + // Stop scanning drives when burning + // otherwise Windows throws EPERM + self.scanner.stop(); + console.debug('Burning ' + image + ' to ' + drive); return self.writer.burn(image, drive).then(function() { console.debug('Done!'); diff --git a/lib/browser/app.js b/lib/browser/app.js index 55893702..92588fd7 100644 --- a/lib/browser/app.js +++ b/lib/browser/app.js @@ -68,6 +68,11 @@ app.controller('AppController', function($q, DriveScannerService, SelectionState }; this.burn = function(image, drive) { + + // Stop scanning drives when burning + // otherwise Windows throws EPERM + self.scanner.stop(); + console.debug('Burning ' + image + ' to ' + drive); return self.writer.burn(image, drive).then(function() { console.debug('Done!');