mirror of
https://github.com/keeweb/keeweb.git
synced 2024-06-26 07:39:04 +02:00
Moved error interpretation to storage provider
This commit is contained in:
parent
11b7f2a9dc
commit
363ff309e6
|
@ -63,6 +63,9 @@ const StorageFile = StorageBase.extend({
|
||||||
const ts = this.logger.ts();
|
const ts = this.logger.ts();
|
||||||
|
|
||||||
const onError = e => {
|
const onError = e => {
|
||||||
|
if (e.hasOwnProperty('code') && e.code === 'EISDIR') {
|
||||||
|
e.isDir = true;
|
||||||
|
}
|
||||||
this.logger.error('Error writing local file', path, e);
|
this.logger.error('Error writing local file', path, e);
|
||||||
if (callback) {
|
if (callback) {
|
||||||
callback(e);
|
callback(e);
|
||||||
|
|
|
@ -514,7 +514,7 @@ const SettingsFileView = Backbone.View.extend({
|
||||||
if (err) {
|
if (err) {
|
||||||
let title = '';
|
let title = '';
|
||||||
let description = '';
|
let description = '';
|
||||||
if (err.hasOwnProperty('code') && err.code === 'EISDIR') {
|
if (err.isDir) {
|
||||||
title = Locale.setFileBackupErrorIsDir;
|
title = Locale.setFileBackupErrorIsDir;
|
||||||
description = Locale.setFileBackupErrorIsDirDescription;
|
description = Locale.setFileBackupErrorIsDirDescription;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user