aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Perl/demos/zinc-demos6
1 files changed, 5 insertions, 1 deletions
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) {