mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-12-27 01:28:56 +08:00
Bugfix: when moving a folder/mailbox check for parent delimiter
This commit is contained in:
parent
859b064d39
commit
ae4a90bda5
1 changed files with 3 additions and 3 deletions
|
@ -488,8 +488,9 @@ export class FolderModel extends AbstractModel {
|
|||
rename(nameToEdit, parentName) {
|
||||
nameToEdit = nameToEdit.trim();
|
||||
const folder = this,
|
||||
parentFolder = getFolderFromCacheList(parentName),
|
||||
oldFullname = folder.fullName,
|
||||
newFullname = parentName + folder.delimiter + nameToEdit;
|
||||
newFullname = (parentFolder ? (parentName + parentFolder.delimiter) : '') + nameToEdit;
|
||||
if (nameToEdit && newFullname != oldFullname) {
|
||||
Remote.abort('Folders').post('FolderRename', FolderUserStore.foldersRenaming, {
|
||||
oldName: oldFullname,
|
||||
|
@ -508,8 +509,7 @@ export class FolderModel extends AbstractModel {
|
|||
} else {
|
||||
removeFolderFromCacheList(folder.fullName);
|
||||
setFolder(folder);
|
||||
const parent = getFolderFromCacheList(folder.parentName);
|
||||
sortFolders(parent ? parent.subFolders : FolderUserStore.folderList);
|
||||
sortFolders(parentFolder ? parentFolder.subFolders : FolderUserStore.folderList);
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
|
|
Loading…
Reference in a new issue