Detect full disk during data migration on Windows (hopefully)

This commit is contained in:
Dan Stillman 2017-06-30 16:59:33 -04:00
parent 010bf3b8f9
commit 536d7254fb

View File

@ -528,14 +528,14 @@ Zotero.File = new function(){
if (!(e instanceof OS.File.Error)) { if (!(e instanceof OS.File.Error)) {
return; return;
} }
Components.classes["@mozilla.org/net/osfileconstantsservice;1"]
if (!Zotero.isWin) { .getService(Components.interfaces.nsIOSFileConstantsService)
switch (e.unixErrno) { .init();
case OS.Constants.libc.ENOSPC: if ((e.unixErrno !== undefined && e.unixErrno == OS.Constants.libc.ENOSPC)
|| (e.winLastError !== undefined && e.winLastError == OS.Constants.libc.ENOSPC)) {
throw e; throw e;
} }
} }
}
function addError(e) { function addError(e) {
errors.push(e); errors.push(e);