Handle missing deleted.txt in unpacked source directory
Unpacked directories aren't actually supported anymore, but fix obvious breakage if they were.
This commit is contained in:
parent
4477e42cf9
commit
499d4e3065
1 changed files with 7 additions and 4 deletions
|
@ -585,11 +585,14 @@ Zotero.Schema = new function(){
|
||||||
var deleted = xpiZipReader.getInputStream("deleted.txt");
|
var deleted = xpiZipReader.getInputStream("deleted.txt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let deletedVersion;
|
||||||
|
if (deleted) {
|
||||||
deleted = yield Zotero.File.getContentsAsync(deleted);
|
deleted = yield Zotero.File.getContentsAsync(deleted);
|
||||||
deleted = deleted.match(/^([^\s]+)/gm);
|
deleted = deleted.match(/^([^\s]+)/gm);
|
||||||
var version = deleted.shift();
|
deletedVersion = deleted.shift();
|
||||||
|
}
|
||||||
|
|
||||||
if (!lastVersion || lastVersion < version) {
|
if (!lastVersion || lastVersion < deletedVersion) {
|
||||||
var toDelete = [];
|
var toDelete = [];
|
||||||
let iterator = new OS.File.DirectoryIterator(destDir);
|
let iterator = new OS.File.DirectoryIterator(destDir);
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Reference in a new issue