Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

*) Fixed bug where a number followed by characters was allowed as a valid value for the amount of memory which YaCy is allowed to consume.

low012809e643ab7c8
diff --git a/reconfigureYACY.sh b/reconfigureYACY.sh
index 17531d767..7d478dce7 100755
--- a/reconfigureYACY.sh
+++ b/reconfigureYACY.sh
@@ -145,6 +145,11 @@ change_mem_settings()
read INPUT
case $INPUT in
+ *[^0-9]*)
+ echo
+ echo 'Please enter a number or just hit enter to abort.'
+ change_mem_settings
+ ;;
[0-9]*)
replace_parameter 'javastart_Xmx' "Xmx$INPUT"'m'
replace_parameter 'javastart_Xms' "Xms$INPUT"'m'
@@ -153,11 +158,6 @@ change_mem_settings()
'')
STATUS="$NOCHANGESTEXT"
;;
- *)
- echo
- echo 'Please enter a number or just hit enter to abort.'
- change_mem_settings
- ;;
esac
}