From 30a6a8e9e927aac072c293f962652ea42e278151 Mon Sep 17 00:00:00 2001 From: mertz Date: Tue, 23 Sep 2003 09:34:01 +0000 Subject: zinc-demos should now find the demos even if an empty directory named xxx/demos/zinc_lib exists somewhere --- Perl/demos/zinc-demos | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Perl/demos') diff --git a/Perl/demos/zinc-demos b/Perl/demos/zinc-demos index 6846526..dcb7604 100644 --- a/Perl/demos/zinc-demos +++ b/Perl/demos/zinc-demos @@ -47,7 +47,11 @@ $MW->configure(-menu => my $menubar = $MW->Menu); $MW->title('TkZinc Perl demonstrations'); $FONT = '-*-Helvetica-Medium-R-Normal--*-140-*-*-*-*-*-*'; my $widget_lib = Tk->findINC('demos/widget_lib'); -my $zinc_lib = Tk->findINC('demos/zinc_lib'); +# the previous simple statement $zinc_lib = Tk->findINC('demos/zinc_lib'); +# found in some cases such old directory empty (e.g. after a previous package de-installation) +# So now, we look for a non-empty demos/zinc_lib directory (ie containing one of the demo!) +my $zinc_lib = Tk->findINC('demos/zinc_lib/tiger.pl'); +($zinc_lib) = $zinc_lib =~ /(.*)\//; my $wd = "$widget_lib/WidgetDemo.pm"; $WIDTRIB = Tk->findINC('demos/zinc_contrib_lib'); unless (Tk::tainting) { -- cgit v1.1