mirror of https://github.com/M66B/FairEmail.git
Prevent renaming to empty folder name
This commit is contained in:
parent
ec4b94d5a6
commit
3d081bf8f4
|
@ -603,6 +603,8 @@ public class FragmentFolder extends FragmentBase {
|
|||
db.folder().insertFolder(create);
|
||||
} else {
|
||||
if (!folder.name.equals(name)) {
|
||||
if (TextUtils.isEmpty(name))
|
||||
throw new IllegalArgumentException(context.getString(R.string.title_folder_name_missing));
|
||||
EntityFolder target = db.folder().getFolderByName(folder.account, name);
|
||||
if (target != null)
|
||||
throw new IllegalArgumentException(context.getString(R.string.title_folder_exists, name));
|
||||
|
|
Loading…
Reference in New Issue