Merge pull request #10685 from osmandapp/fix_10621

Fix_10621
This commit is contained in:
vshcherb 2021-01-27 16:36:56 +01:00 committed by GitHub
commit e48012a461
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -99,7 +99,9 @@ public class RenameFileBottomSheet extends MenuBottomSheetDialogFragment {
} }
private void updateFileName(String name) { private void updateFileName(String name) {
if (!Algorithms.isEmpty(name) && ILLEGAL_FILE_NAME_CHARACTERS.matcher(name).find()) { if (Algorithms.isBlank(name)) {
nameTextBox.setError(getString(R.string.empty_filename));
} else if (ILLEGAL_FILE_NAME_CHARACTERS.matcher(name).find()) {
nameTextBox.setError(getString(R.string.file_name_containes_illegal_char)); nameTextBox.setError(getString(R.string.file_name_containes_illegal_char));
} else { } else {
selectedFileName = name; selectedFileName = name;