1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-12-02 22:49:09 +02:00

Handle reserved names in RN

This commit is contained in:
Laurent Cozic
2017-07-15 17:25:33 +01:00
parent 0e05567706
commit e3db1e028a
3 changed files with 26 additions and 3 deletions

View File

@@ -119,7 +119,7 @@ class Folder extends BaseItem {
static async save(o, options = null) {
if (options && options.duplicateCheck === true && o.title) {
let existingFolder = await Folder.loadByTitle(o.title);
if (existingFolder) throw new Error(_('A notebook with this title already exists: "%s"', o.title));
if (existingFolder && existingFolder.id != o.id) throw new Error(_('A notebook with this title already exists: "%s"', o.title));
}
if (options && options.reservedTitleCheck === true && o.title) {