dirname instead of abs_path $x/..
authorHeiko Schlittermann (VIC) <hs@schlittermann.de>
Wed, 03 Aug 2011 10:41:51 +0200
changeset 52 100c97dc02ca
parent 51 0b6b92d1eb65
child 58 f837948e43a4
dirname instead of abs_path $x/..
bin/imager.restore
--- a/bin/imager.restore	Mon Aug 01 13:02:09 2011 +0200
+++ b/bin/imager.restore	Wed Aug 03 10:41:51 2011 +0200
@@ -13,7 +13,6 @@
 use strict;
 use warnings;
 use File::Basename;
-use Cwd qw(abs_path);
 use autodie qw(:all);
 use Pod::Usage;
 use Getopt::Long;
@@ -116,7 +115,7 @@
 }
 
 sub find_data_dir {
-    for (my $dir = shift ; $dir ne "/" ; $dir = abs_path("$dir/..")) {
+    for (my $dir = shift ; $dir ne "/" ; $dir = dirname $dir) {
         return "$dir/data" if -d "$dir/data" and -d "$dir/idx";
     }
     die ME . ": no data directory found!\n";