From 4fa65de31df48d6c8a90cccb2c42abe8bce3447b Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Tue, 11 Jul 2017 00:17:03 +0100 Subject: [PATCH] Fixed various bugs --- CliClient/app/app.js | 1 + CliClient/app/command-version.js | 8 +++++--- CliClient/package.json | 2 +- ReactNativeClient/android/app/build.gradle | 4 ++-- ReactNativeClient/lib/onedrive-api.js | 3 +++ ReactNativeClient/lib/synchronizer.js | 5 +++-- 6 files changed, 15 insertions(+), 8 deletions(-) diff --git a/CliClient/app/app.js b/CliClient/app/app.js index ae17d3678b..9c559af017 100644 --- a/CliClient/app/app.js +++ b/CliClient/app/app.js @@ -158,6 +158,7 @@ class Application { } if (!matched.logLevel) matched.logLevel = Logger.LEVEL_INFO; + if (!matched.env) matched.env = 'prod'; return { matched: matched, diff --git a/CliClient/app/command-version.js b/CliClient/app/command-version.js index 56169e7427..e5beebfa2a 100644 --- a/CliClient/app/command-version.js +++ b/CliClient/app/command-version.js @@ -1,4 +1,6 @@ import { BaseCommand } from './base-command.js'; +import { Setting } from 'lib/models/setting.js' +import { _ } from 'lib/locale.js'; class Command extends BaseCommand { @@ -10,9 +12,9 @@ class Command extends BaseCommand { return 'Displays version information'; } - async ction(args) { - const packageJson = require('./package.json'); - this.log(packageJson.name + ' ' + packageJson.version); + async action(args) { + const p = require('./package.json'); + this.log(_('%s %s (%s)', p.name, p.version, Setting.value('env'))); } } diff --git a/CliClient/package.json b/CliClient/package.json index 61bfb1d08a..473f67e070 100644 --- a/CliClient/package.json +++ b/CliClient/package.json @@ -7,7 +7,7 @@ "url": "https://github.com/laurent22/joplin" }, "url": "git://github.com/laurent22/joplin.git", - "version": "0.8.31", + "version": "0.8.35", "bin": { "joplin": "./main_launcher.js" }, diff --git a/ReactNativeClient/android/app/build.gradle b/ReactNativeClient/android/app/build.gradle index a08a37d8fd..006a25ee33 100644 --- a/ReactNativeClient/android/app/build.gradle +++ b/ReactNativeClient/android/app/build.gradle @@ -90,8 +90,8 @@ android { applicationId "net.cozic.joplin" minSdkVersion 16 targetSdkVersion 22 - versionCode 4 - versionName "0.8.2" + versionCode 8 + versionName "0.8.6" ndk { abiFilters "armeabi-v7a", "x86" } diff --git a/ReactNativeClient/lib/onedrive-api.js b/ReactNativeClient/lib/onedrive-api.js index aff7fe7976..727badeb83 100644 --- a/ReactNativeClient/lib/onedrive-api.js +++ b/ReactNativeClient/lib/onedrive-api.js @@ -193,6 +193,9 @@ class OneDriveApi { this.logger().info(error); await time.msleep(1000 * i); continue; + } else if (error.code == 'itemNotFound' && method == 'DELETE') { + // Deleting a non-existing item is ok - noop + return; } else { error.request = method + ' ' + url + ' ' + JSON.stringify(query) + ' ' + JSON.stringify(data) + ' ' + JSON.stringify(options); throw error; diff --git a/ReactNativeClient/lib/synchronizer.js b/ReactNativeClient/lib/synchronizer.js index 7c259fcd6b..0952437375 100644 --- a/ReactNativeClient/lib/synchronizer.js +++ b/ReactNativeClient/lib/synchronizer.js @@ -66,6 +66,7 @@ class Synchronizer { async logSyncSummary(report) { for (let n in report) { if (!report.hasOwnProperty(n)) continue; + if (n == 'errors') continue; this.logger().info(n + ': ' + (report[n] ? report[n] : '-')); } let folderCount = await Folder.count(); @@ -79,8 +80,8 @@ class Synchronizer { this.logger().warn('There was some errors:'); for (let i = 0; i < report.errors.length; i++) { let e = report.errors[i]; - let msg = e && e.message ? e.message : JSON.stringify(e); - this.logger().warn(msg); + //let msg = JSON.stringify(e); //e && e.message ? e.message : JSON.stringify(e); + this.logger().warn(e); } } }