1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-01 04:35:57 +00:00

Prevent renaming to empty folder name

This commit is contained in:
M66B 2021-03-17 07:48:39 +01:00
parent ec4b94d5a6
commit 3d081bf8f4

View file

@ -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));