Compare commits

...
2 Commits
Author SHA1 Message Date
fyears 480cf224c6 bump to 0.3.37
Release A New Version / build (16.x) (push) Failing after 47s
2024-01-14 16:19:25 +08:00
fyears 37a801332f vault might be undefined 2024-01-14 16:19:00 +08:00
5 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"id": "remotely-save", "id": "remotely-save",
"name": "Remotely Save", "name": "Remotely Save",
"version": "0.3.36", "version": "0.3.37",
"minAppVersion": "0.13.21", "minAppVersion": "0.13.21",
"description": "Yet another unofficial plugin allowing users to synchronize notes between local device and the cloud service.", "description": "Yet another unofficial plugin allowing users to synchronize notes between local device and the cloud service.",
"author": "fyears", "author": "fyears",
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"id": "remotely-save", "id": "remotely-save",
"name": "Remotely Save", "name": "Remotely Save",
"version": "0.3.36", "version": "0.3.37",
"minAppVersion": "0.13.21", "minAppVersion": "0.13.21",
"description": "Yet another unofficial plugin allowing users to synchronize notes between local device and the cloud service.", "description": "Yet another unofficial plugin allowing users to synchronize notes between local device and the cloud service.",
"author": "fyears", "author": "fyears",
+2 -2
View File
@@ -542,8 +542,8 @@ export const uploadToRemote = async (
let mtime = 0; let mtime = 0;
let ctime = 0; let ctime = 0;
const s = await vault.adapter.stat(fileOrFolderPath); const s = await vault?.adapter?.stat(fileOrFolderPath);
if (s !== null) { if (s !== undefined && s !== null) {
mtime = Math.round(s.mtime / 1000.0) * 1000; mtime = Math.round(s.mtime / 1000.0) * 1000;
ctime = Math.round(s.ctime / 1000.0) * 1000; ctime = Math.round(s.ctime / 1000.0) * 1000;
} }
+2 -2
View File
@@ -699,8 +699,8 @@ export const uploadToRemote = async (
let mtime = 0; let mtime = 0;
let ctime = 0; let ctime = 0;
const s = await vault.adapter.stat(fileOrFolderPath); const s = await vault?.adapter?.stat(fileOrFolderPath);
if (s !== null) { if (s !== undefined && s !== null) {
mtime = s.mtime; mtime = s.mtime;
ctime = s.ctime; ctime = s.ctime;
} }
+4 -4
View File
@@ -366,8 +366,8 @@ export const uploadToRemote = async (
// folder // folder
let mtime = 0; let mtime = 0;
let ctime = 0; let ctime = 0;
const s = await vault.adapter.stat(fileOrFolderPath); const s = await vault?.adapter?.stat(fileOrFolderPath);
if (s !== null) { if (s !== undefined && s !== null) {
mtime = s.mtime; mtime = s.mtime;
ctime = s.ctime; ctime = s.ctime;
} }
@@ -408,8 +408,8 @@ export const uploadToRemote = async (
ctime = rawContentCTime; ctime = rawContentCTime;
} else { } else {
localContent = await vault.adapter.readBinary(fileOrFolderPath); localContent = await vault.adapter.readBinary(fileOrFolderPath);
const s = await vault.adapter.stat(fileOrFolderPath); const s = await vault?.adapter?.stat(fileOrFolderPath);
if (s !== null) { if (s !== undefined && s !== null) {
mtime = s.mtime; mtime = s.mtime;
ctime = s.ctime; ctime = s.ctime;
} }