fix onedrive issue in enc
This commit is contained in:
parent
e66b0c71c4
commit
2a3df8ab53
@ -16,4 +16,5 @@ export abstract class FakeFs {
|
|||||||
abstract checkConnect(callbackFunc?: any): Promise<boolean>;
|
abstract checkConnect(callbackFunc?: any): Promise<boolean>;
|
||||||
abstract getUserDisplayName(): Promise<string>;
|
abstract getUserDisplayName(): Promise<string>;
|
||||||
abstract revokeAuth(): Promise<any>;
|
abstract revokeAuth(): Promise<any>;
|
||||||
|
abstract allowEmptyFile(): boolean;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -736,4 +736,8 @@ export class FakeFsDropbox extends FakeFs {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
allowEmptyFile(): boolean {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -273,9 +273,13 @@ export class FakeFsEncrypt extends FakeFs {
|
|||||||
return copyEntityAndCopyKeyEncSizeEnc(innerEntity);
|
return copyEntityAndCopyKeyEncSizeEnc(innerEntity);
|
||||||
} else {
|
} else {
|
||||||
const now = Date.now();
|
const now = Date.now();
|
||||||
|
let content = new ArrayBuffer(0);
|
||||||
|
if (!this.innerFs.allowEmptyFile()) {
|
||||||
|
content = new ArrayBuffer(1);
|
||||||
|
}
|
||||||
const innerEntity = await this.innerFs.writeFile(
|
const innerEntity = await this.innerFs.writeFile(
|
||||||
keyEnc,
|
keyEnc,
|
||||||
new ArrayBuffer(0),
|
content,
|
||||||
mtime ?? now,
|
mtime ?? now,
|
||||||
ctime ?? now
|
ctime ?? now
|
||||||
);
|
);
|
||||||
@ -554,4 +558,8 @@ export class FakeFsEncrypt extends FakeFs {
|
|||||||
async revokeAuth(): Promise<any> {
|
async revokeAuth(): Promise<any> {
|
||||||
return await this.innerFs.revokeAuth();
|
return await this.innerFs.revokeAuth();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
allowEmptyFile(): boolean {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -170,4 +170,8 @@ export class FakeFsLocal extends FakeFs {
|
|||||||
async revokeAuth(): Promise<any> {
|
async revokeAuth(): Promise<any> {
|
||||||
throw new Error("Method not implemented.");
|
throw new Error("Method not implemented.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
allowEmptyFile(): boolean {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -49,4 +49,8 @@ export class FakeFsMock extends FakeFs {
|
|||||||
async revokeAuth(): Promise<any> {
|
async revokeAuth(): Promise<any> {
|
||||||
throw new Error("Method not implemented.");
|
throw new Error("Method not implemented.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
allowEmptyFile(): boolean {
|
||||||
|
throw new Error("Method not implemented.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -928,4 +928,8 @@ export class FakeFsOnedrive extends FakeFs {
|
|||||||
async getRevokeAddr() {
|
async getRevokeAddr() {
|
||||||
return "https://account.live.com/consent/Manage";
|
return "https://account.live.com/consent/Manage";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
allowEmptyFile(): boolean {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -817,4 +817,8 @@ export class FakeFsS3 extends FakeFs {
|
|||||||
async revokeAuth() {
|
async revokeAuth() {
|
||||||
throw new Error("Method not implemented.");
|
throw new Error("Method not implemented.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
allowEmptyFile(): boolean {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -493,4 +493,8 @@ export class FakeFsWebdav extends FakeFs {
|
|||||||
async revokeAuth() {
|
async revokeAuth() {
|
||||||
throw new Error("Method not implemented.");
|
throw new Error("Method not implemented.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
allowEmptyFile(): boolean {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -239,4 +239,8 @@ export class FakeFsWebdis extends FakeFs {
|
|||||||
async revokeAuth(): Promise<any> {
|
async revokeAuth(): Promise<any> {
|
||||||
throw new Error("Method not implemented.");
|
throw new Error("Method not implemented.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
allowEmptyFile(): boolean {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user