new album: prevent creation if directory already exists
This commit is contained in:
parent
685e3fe9b6
commit
104a0878c9
1 changed files with 1 additions and 1 deletions
|
@ -153,7 +153,7 @@ class _CreateAlbumDialogState extends State<CreateAlbumDialog> {
|
|||
final path = _buildAlbumPath(newName);
|
||||
final exists = newName.isNotEmpty && await Directory(path).exists();
|
||||
_existsNotifier.value = exists;
|
||||
_isValidNotifier.value = newName.isNotEmpty;
|
||||
_isValidNotifier.value = newName.isNotEmpty && !exists;
|
||||
}
|
||||
|
||||
void _submit(BuildContext context) => Navigator.pop(context, _buildAlbumPath(_nameController.text));
|
||||
|
|
Loading…
Reference in a new issue