You've already forked joplin
							
							
				mirror of
				https://github.com/laurent22/joplin.git
				synced 2025-10-31 00:07:48 +02:00 
			
		
		
		
	Merge branch 'master' of github.com:laurent22/joplin
This commit is contained in:
		
							
								
								
									
										2
									
								
								CliClient/package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								CliClient/package-lock.json
									
									
									
										generated
									
									
									
								
							| @@ -1,6 +1,6 @@ | ||||
| { | ||||
|   "name": "joplin", | ||||
|   "version": "0.10.55", | ||||
|   "version": "0.10.57", | ||||
|   "lockfileVersion": 1, | ||||
|   "requires": true, | ||||
|   "dependencies": { | ||||
|   | ||||
| @@ -18,7 +18,7 @@ | ||||
|     ], | ||||
|     "owner": "Laurent Cozic" | ||||
|   }, | ||||
|   "version": "0.10.55", | ||||
|   "version": "0.10.57", | ||||
|   "bin": { | ||||
|     "joplin": "./main.js" | ||||
|   }, | ||||
|   | ||||
| @@ -79,6 +79,8 @@ class FileApiDriverLocal { | ||||
| 	} | ||||
|  | ||||
| 	async delta(path, options) { | ||||
| 		const itemIds = await options.allItemIdsHandler(); | ||||
|  | ||||
| 		try { | ||||
| 			let items = await fs.readdir(path); | ||||
| 			let output = []; | ||||
| @@ -89,11 +91,11 @@ class FileApiDriverLocal { | ||||
| 				output.push(stat); | ||||
| 			} | ||||
|  | ||||
| 			if (!Array.isArray(options.itemIds)) throw new Error('Delta API not supported - local IDs must be provided'); | ||||
| 			if (!Array.isArray(itemIds)) throw new Error('Delta API not supported - local IDs must be provided'); | ||||
|  | ||||
| 			let deletedItems = []; | ||||
| 			for (let i = 0; i < options.itemIds.length; i++) { | ||||
| 				const itemId = options.itemIds[i]; | ||||
| 			for (let i = 0; i < itemIds.length; i++) { | ||||
| 				const itemId = itemIds[i]; | ||||
| 				let found = false; | ||||
| 				for (let j = 0; j < output.length; j++) { | ||||
| 					const item = output[j]; | ||||
|   | ||||
| @@ -358,14 +358,15 @@ class Synchronizer { | ||||
| 			while (true) { | ||||
| 				if (this.cancelling()) break; | ||||
|  | ||||
| 				let allIds = null; | ||||
| 				if (!this.api().supportsDelta()) { | ||||
| 					allIds = await BaseItem.syncedItemIds(syncTargetId); | ||||
| 				} | ||||
| 				// let allIds = null; | ||||
| 				// if (!this.api().supportsDelta()) { | ||||
| 				// 	allIds = await BaseItem.syncedItemIds(syncTargetId); | ||||
| 				// } | ||||
|  | ||||
| 				let listResult = await this.api().delta('', { | ||||
| 					context: context, | ||||
| 					itemIds: allIds, | ||||
| 					// itemIds: allIds, | ||||
| 					allItemIdsHandler: async () => { return BaseItem.syncedItemIds(syncTargetId); } | ||||
| 				}); | ||||
|  | ||||
| 				let remotes = listResult.items; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user