Префикс "file://" заменен на "disk://", т.к. порождается конфликт с браузерным протоколом file://

This commit is contained in:
Book Pauk
2020-12-02 22:01:36 +07:00
parent b2d6584c4a
commit c59f48822c
6 changed files with 43 additions and 9 deletions

View File

@@ -81,7 +81,7 @@ class ReaderWorker {
const decompDirname = utils.randomHexString(30);
//download or use uploaded
if (url.indexOf('file://') != 0) {//download
if (url.indexOf('disk://') != 0) {//download
const downdata = await this.down.load(url, (progress) => {
wState.set({progress});
}, q.abort);
@@ -214,7 +214,7 @@ class ReaderWorker {
await fs.remove(file.path);
}
return `file://${hash}`;
return `disk://${hash}`;
}
async restoreRemoteFile(filename) {