From 34da6d5a749c4bf2a6b3e6ec30da5fd71999c4be Mon Sep 17 00:00:00 2001 From: Michael Pyne Date: Sun, 9 Oct 2011 13:22:13 -0400 Subject: [PATCH] Better sanity check when making base directory. This should catch idiot coders (i.e. me) who call getSubdirPath('build') instead of the correct getSubdirPath('build-dir'). --- kdesrc-build | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kdesrc-build b/kdesrc-build index 509323a..21a7ceb 100755 --- a/kdesrc-build +++ b/kdesrc-build @@ -1597,6 +1597,11 @@ HOME # If build-dir starts with a slash, it is an absolute path. return $dir if $dir =~ /^\//; + # Make sure we got a valid option result. + if (!$dir) { + confess ("Reading option for $subdirOption gave empty \$dir!"); + } + # If it starts with a tilde, expand it out. if ($dir =~ /^~/) {