Fix EPERM issue when burning in Windows

The issue is fixed by stopping the drive scanner interval before
burning.
This commit is contained in:
Juan Cruz Viotti 2015-10-29 10:29:50 -04:00
parent 4bfb161e5c
commit 18b0bb38e9
2 changed files with 10 additions and 0 deletions

View File

@ -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!');

View File

@ -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!');