1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-23 22:36:32 +02:00

Desktop: Add OneNote Importer (#11392)

This commit is contained in:
pedr
2024-11-17 13:21:08 -03:00
committed by GitHub
parent e36f37707f
commit 4d7fa5972f
194 changed files with 15920 additions and 14 deletions

View File

@@ -17,6 +17,7 @@ import crypto from './services/e2ee/crypto';
import FileApiDriverLocal from './file-api-driver-local';
import * as mimeUtils from './mime-utils';
import BaseItem from './models/BaseItem';
const { _ } = require('./locale');
const http = require('http');
const https = require('https');
@@ -309,13 +310,11 @@ function shimInit(options: ShimInitOptions = null) {
const isUpdate = !!options.destinationResourceId;
const uuid = require('./uuid').default;
if (!(await fs.pathExists(filePath))) throw new Error(_('Cannot access %s', filePath));
defaultProps = defaultProps ? defaultProps : {};
let resourceId = defaultProps.id ? defaultProps.id : uuid.create();
let resourceId = defaultProps.id ? defaultProps.id : BaseItem.generateUuid();
if (isUpdate) resourceId = options.destinationResourceId;
let resource = isUpdate ? {} : Resource.new();