init_component: require absolute path (when invoked by user scripts);
authorwenzelm
Tue, 16 Nov 2010 21:54:52 +0100
changeset 40570 bf8f92bdf630
parent 40569 ffcff7509a49
child 40571 fbac01813bff
init_component: require absolute path (when invoked by user scripts);
lib/scripts/getsettings
--- a/lib/scripts/getsettings	Tue Nov 16 21:48:14 2010 +0100
+++ b/lib/scripts/getsettings	Tue Nov 16 21:54:52 2010 +0100
@@ -91,6 +91,13 @@
 function init_component ()
 {
   local COMPONENT="$1"
+  case "$COMPONENT" in
+    /*) ;;
+    *)
+      echo >&2 "Absolute component path required: \"$COMPONENT\""
+      exit 2
+      ;;
+  esac
 
   if [ ! -d "$COMPONENT" ]; then
     echo >&2 "Bad Isabelle component: \"$COMPONENT\""