1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Fixed various bugs

This commit is contained in:
Laurent Cozic 2017-07-11 00:17:03 +01:00
parent 4adc9b30fb
commit 4fa65de31d
6 changed files with 15 additions and 8 deletions

View File

@ -158,6 +158,7 @@ class Application {
} }
if (!matched.logLevel) matched.logLevel = Logger.LEVEL_INFO; if (!matched.logLevel) matched.logLevel = Logger.LEVEL_INFO;
if (!matched.env) matched.env = 'prod';
return { return {
matched: matched, matched: matched,

View File

@ -1,4 +1,6 @@
import { BaseCommand } from './base-command.js'; import { BaseCommand } from './base-command.js';
import { Setting } from 'lib/models/setting.js'
import { _ } from 'lib/locale.js';
class Command extends BaseCommand { class Command extends BaseCommand {
@ -10,9 +12,9 @@ class Command extends BaseCommand {
return 'Displays version information'; return 'Displays version information';
} }
async ction(args) { async action(args) {
const packageJson = require('./package.json'); const p = require('./package.json');
this.log(packageJson.name + ' ' + packageJson.version); this.log(_('%s %s (%s)', p.name, p.version, Setting.value('env')));
} }
} }

View File

@ -7,7 +7,7 @@
"url": "https://github.com/laurent22/joplin" "url": "https://github.com/laurent22/joplin"
}, },
"url": "git://github.com/laurent22/joplin.git", "url": "git://github.com/laurent22/joplin.git",
"version": "0.8.31", "version": "0.8.35",
"bin": { "bin": {
"joplin": "./main_launcher.js" "joplin": "./main_launcher.js"
}, },

View File

@ -90,8 +90,8 @@ android {
applicationId "net.cozic.joplin" applicationId "net.cozic.joplin"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 22 targetSdkVersion 22
versionCode 4 versionCode 8
versionName "0.8.2" versionName "0.8.6"
ndk { ndk {
abiFilters "armeabi-v7a", "x86" abiFilters "armeabi-v7a", "x86"
} }

View File

@ -193,6 +193,9 @@ class OneDriveApi {
this.logger().info(error); this.logger().info(error);
await time.msleep(1000 * i); await time.msleep(1000 * i);
continue; continue;
} else if (error.code == 'itemNotFound' && method == 'DELETE') {
// Deleting a non-existing item is ok - noop
return;
} else { } else {
error.request = method + ' ' + url + ' ' + JSON.stringify(query) + ' ' + JSON.stringify(data) + ' ' + JSON.stringify(options); error.request = method + ' ' + url + ' ' + JSON.stringify(query) + ' ' + JSON.stringify(data) + ' ' + JSON.stringify(options);
throw error; throw error;

View File

@ -66,6 +66,7 @@ class Synchronizer {
async logSyncSummary(report) { async logSyncSummary(report) {
for (let n in report) { for (let n in report) {
if (!report.hasOwnProperty(n)) continue; if (!report.hasOwnProperty(n)) continue;
if (n == 'errors') continue;
this.logger().info(n + ': ' + (report[n] ? report[n] : '-')); this.logger().info(n + ': ' + (report[n] ? report[n] : '-'));
} }
let folderCount = await Folder.count(); let folderCount = await Folder.count();
@ -79,8 +80,8 @@ class Synchronizer {
this.logger().warn('There was some errors:'); this.logger().warn('There was some errors:');
for (let i = 0; i < report.errors.length; i++) { for (let i = 0; i < report.errors.length; i++) {
let e = report.errors[i]; let e = report.errors[i];
let msg = e && e.message ? e.message : JSON.stringify(e); //let msg = JSON.stringify(e); //e && e.message ? e.message : JSON.stringify(e);
this.logger().warn(msg); this.logger().warn(e);
} }
} }
} }