From 85f695c7a86a84cf7fb5f98949958f8856580583 Mon Sep 17 00:00:00 2001 From: mendhak Date: Sun, 5 Nov 2023 11:04:46 +0000 Subject: [PATCH] Disallow certain chracters but allow spaces in the filename --- .../gpslogger/ui/fragments/display/GenericViewFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpslogger/src/main/java/com/mendhak/gpslogger/ui/fragments/display/GenericViewFragment.java b/gpslogger/src/main/java/com/mendhak/gpslogger/ui/fragments/display/GenericViewFragment.java index 272a62356..9c2dbb272 100644 --- a/gpslogger/src/main/java/com/mendhak/gpslogger/ui/fragments/display/GenericViewFragment.java +++ b/gpslogger/src/main/java/com/mendhak/gpslogger/ui/fragments/display/GenericViewFragment.java @@ -120,7 +120,7 @@ public void requestToggleLogging() { formElements.add(Input.plain(PreferenceNames.CUSTOM_FILE_NAME) .required() // Don't allow *, &, %, / or \ in the file name. - .validatePattern("^[^*&%/\\]+$", "Invalid file name") + .validatePattern("^[^*&%/\\\\]+$", "Invalid file name") .suggest(new ArrayList<>(cachedList)) .text(preferenceHelper.getCustomFileName()) );