add onedrive mtime error
This commit is contained in:
parent
871e8dc3cf
commit
254231e4bd
@ -290,8 +290,12 @@ const fromDriveItemToEntity = (x: DriveItem, remoteBaseDir: string): Entity => {
|
|||||||
key = `${key}/`;
|
key = `${key}/`;
|
||||||
}
|
}
|
||||||
|
|
||||||
const mtimeSvr = Date.parse(x?.fileSystemInfo!.lastModifiedDateTime!);
|
const mtimeTry = x?.fileSystemInfo?.lastModifiedDateTime;
|
||||||
const mtimeCli = Date.parse(x?.fileSystemInfo!.lastModifiedDateTime!);
|
if (mtimeTry === undefined || mtimeTry === null) {
|
||||||
|
throw Error(`onedrive cannot parse mtime: ${JSON.stringify(x, null, 2)}`);
|
||||||
|
}
|
||||||
|
const mtimeSvr = Date.parse(mtimeTry);
|
||||||
|
const mtimeCli = Date.parse(mtimeTry);
|
||||||
return {
|
return {
|
||||||
key: key,
|
key: key,
|
||||||
keyRaw: key,
|
keyRaw: key,
|
||||||
|
|||||||
@ -399,8 +399,12 @@ ${constructFromDriveItemToEntityError(x)}`
|
|||||||
key = `${key}/`;
|
key = `${key}/`;
|
||||||
}
|
}
|
||||||
|
|
||||||
const mtimeSvr = Date.parse(x?.fileSystemInfo!.lastModifiedDateTime!);
|
const mtimeTry = x?.fileSystemInfo?.lastModifiedDateTime;
|
||||||
const mtimeCli = Date.parse(x?.fileSystemInfo!.lastModifiedDateTime!);
|
if (mtimeTry === undefined || mtimeTry === null) {
|
||||||
|
throw Error(`onedrive cannot parse mtime: ${JSON.stringify(x, null, 2)}`);
|
||||||
|
}
|
||||||
|
const mtimeSvr = Date.parse(mtimeTry);
|
||||||
|
const mtimeCli = Date.parse(mtimeTry);
|
||||||
return {
|
return {
|
||||||
key: key,
|
key: key,
|
||||||
keyRaw: key,
|
keyRaw: key,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user