Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d9cab7b1ff | ||
|
|
5e53967e01 | ||
|
|
fb9f4a67b4 | ||
|
|
26a426dda8 | ||
|
|
de64c3c53f | ||
|
|
0cefafa491 |
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "remotely-save",
|
||||
"name": "Remotely Save",
|
||||
"version": "0.4.22",
|
||||
"version": "0.4.24",
|
||||
"minAppVersion": "0.13.21",
|
||||
"description": "Yet another unofficial plugin allowing users to synchronize notes between local device and the cloud service.",
|
||||
"author": "fyears",
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "remotely-save",
|
||||
"name": "Remotely Save",
|
||||
"version": "0.4.22",
|
||||
"version": "0.4.24",
|
||||
"minAppVersion": "0.13.21",
|
||||
"description": "Yet another unofficial plugin allowing users to synchronize notes between local device and the cloud service.",
|
||||
"author": "fyears",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "remotely-save",
|
||||
"version": "0.4.22",
|
||||
"version": "0.4.24",
|
||||
"description": "This is yet another sync plugin for Obsidian app.",
|
||||
"scripts": {
|
||||
"dev2": "node esbuild.config.mjs --watch",
|
||||
|
||||
+3
-1
@@ -87,7 +87,9 @@ export class FakeFsEncrypt extends FakeFs {
|
||||
this.cacheMapOrigToEnc = {};
|
||||
this.hasCacheMap = false;
|
||||
|
||||
this.kind = `encrypt(${this.innerFs.kind},${method})`;
|
||||
this.kind = `encrypt(${this.innerFs.kind},${
|
||||
this.password !== "" ? method : "no password"
|
||||
})`;
|
||||
|
||||
if (method === "rclone-base64") {
|
||||
this.cipherRClone = new rclone.CipherRclone(password, 5);
|
||||
|
||||
+29
-4
@@ -422,7 +422,20 @@ export class FakeFsWebdav extends FakeFs {
|
||||
// glob: "/**" /* avoid dot files by using glob */,
|
||||
}) as Promise<FileStat[]>;
|
||||
});
|
||||
const r2 = flatten(await Promise.all(r));
|
||||
const r3 = await Promise.all(r);
|
||||
for (const r4 of r3) {
|
||||
if (
|
||||
this.webdavConfig.address.includes("jianguoyun.com") &&
|
||||
r4.length >= 749
|
||||
) {
|
||||
// https://help.jianguoyun.com/?p=2064
|
||||
// no more than 750 per request
|
||||
throw Error(
|
||||
`出错:坚果云 api 有限制,文件列表加载不全。终止同步!`
|
||||
);
|
||||
}
|
||||
}
|
||||
const r2 = flatten(r3);
|
||||
subContents.push(...r2);
|
||||
}
|
||||
for (let i = 0; i < subContents.length; ++i) {
|
||||
@@ -536,7 +549,19 @@ export class FakeFsWebdav extends FakeFs {
|
||||
);
|
||||
}
|
||||
|
||||
// larger than 10 MB, try to upload by chunks
|
||||
// larger than 10 MB
|
||||
if (!this.isNextcloud && !this.supportNativePartial) {
|
||||
// give up and upload by whole, and directly return
|
||||
return await this._writeFileFromRootFull(
|
||||
key,
|
||||
content,
|
||||
mtime,
|
||||
ctime,
|
||||
origKey
|
||||
);
|
||||
}
|
||||
|
||||
// try to upload by chunks
|
||||
try {
|
||||
if (this.isNextcloud) {
|
||||
return await this._writeFileFromRootNextcloud(
|
||||
@@ -555,10 +580,10 @@ export class FakeFsWebdav extends FakeFs {
|
||||
origKey
|
||||
);
|
||||
}
|
||||
throw Error(`no partial upload / update`);
|
||||
throw Error(`Error: partial upload / update method is not implemented??`);
|
||||
} catch (e) {
|
||||
console.error(
|
||||
`we fail to write file partially, so downgrade to full and ignore the error:`
|
||||
`we fail to write file partially for nextcloud or apache or sabre/dav, stop!`
|
||||
);
|
||||
console.error(e);
|
||||
throw e;
|
||||
|
||||
+2
-1
@@ -986,7 +986,8 @@ async function copyFile(
|
||||
const statsLeft = await left.stat(key);
|
||||
const content = await left.readFile(key);
|
||||
|
||||
if (statsLeft.size === undefined) {
|
||||
if (statsLeft.size === undefined || statsLeft.size === 0) {
|
||||
// some weird bugs on android not returning size. just ignore them
|
||||
statsLeft.size = content.byteLength;
|
||||
} else {
|
||||
if (statsLeft.size !== content.byteLength) {
|
||||
|
||||
Reference in New Issue
Block a user