Skip to content

armgit / haven

Public Imported from GitHub
0

Haven is for people who need a way to protect their personal spaces and possessions without compromising their own privacy, through an Android app and on-device sensors

Limit save directory path to alphanumeric plus underline, dash & /

fattire73a72ef52195
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index 6d3d24e..e2480df 100644
--- a/src/main/res/values/strings.xml
+++ b/src/main/res/values/strings.xml
@@ -159,4 +159,8 @@
<string name="config_storage_path">Storage Folder Path</string>
<string name="config_storage_page_hint">Where captured media is stored</string>
+ <!-- accepted digits for directory name -- may vary for locale/platform/etc.
+ Skipping periods, spaces, and other special characters to keep it simple -->
+ <string name="path_chars">0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_/</string>
+
</resources>
diff --git a/src/main/res/xml/settings.xml b/src/main/res/xml/settings.xml
index 0da05e0..7f8ba82 100644
--- a/src/main/res/xml/settings.xml
+++ b/src/main/res/xml/settings.xml
@@ -12,6 +12,7 @@
android:summary="@string/config_storage_page_hint"
android:title="@string/config_storage_path"
android:defaultValue="/phoneypot"
+ android:digits="@string/path_chars"
/>
<Preference