Prevent renaming to empty folder name

This commit is contained in:
M66B 2021-03-17 07:48:39 +01:00
parent ec4b94d5a6
commit 3d081bf8f4
1 changed files with 2 additions and 0 deletions

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