From 830cc1a7d4974575991a249c7bf5e766be4a8114 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Wed, 27 Jan 2021 17:29:14 +0200 Subject: [PATCH] Fix #10621 --- OsmAnd/src/net/osmand/plus/dialogs/RenameFileBottomSheet.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/dialogs/RenameFileBottomSheet.java b/OsmAnd/src/net/osmand/plus/dialogs/RenameFileBottomSheet.java index af26533607..f2bfe0e6e7 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/RenameFileBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/RenameFileBottomSheet.java @@ -99,7 +99,9 @@ public class RenameFileBottomSheet extends MenuBottomSheetDialogFragment { } 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)); } else { selectedFileName = name;