mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-05-16 20:41:18 +00:00
Merge pull request #893 from brian-spackman/fix-fractional-mtime-on-linux
fix: truncate sub-millisecond CLI mtimes to prevent mobile crash
This commit is contained in:
@@ -173,8 +173,8 @@ export async function runCommand(options: CLIOptions, context: CLICommandContext
|
||||
console.log(`[Command] push ${sourcePath} -> ${destinationDatabasePath}`);
|
||||
|
||||
await core.serviceModules.storageAccess.writeFileAuto(destinationDatabasePath, toArrayBuffer(sourceData), {
|
||||
mtime: sourceStat.mtimeMs,
|
||||
ctime: sourceStat.ctimeMs,
|
||||
mtime: Math.floor(sourceStat.mtimeMs),
|
||||
ctime: Math.floor(sourceStat.ctimeMs),
|
||||
});
|
||||
const destinationPathWithPrefix = destinationDatabasePath as FilePathWithPrefix;
|
||||
const stored = await core.serviceModules.fileHandler.storeFileToDB(destinationPathWithPrefix, true);
|
||||
|
||||
Reference in New Issue
Block a user