diff options
author | Daniel Friesel <derf@finalrewind.org> | 2010-12-19 15:05:13 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2010-12-19 15:05:13 +0100 |
commit | 4b5f3cc16d56ac7620a001fe5066f17ca8fb7309 (patch) | |
tree | ad00e00503462f659f69aa1d62a39d88235776dd /bin | |
parent | 07abc5ff42ccf85ddef339bf1a12cedd3185a239 (diff) |
Use absolute path for dbfile
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/hashl | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -17,7 +17,7 @@ use Time::Progress; my $base = getcwd(); my $rel_paths = 1; my $read_size = (2 ** 20) * 4; # 4 MiB -my $db_file = "$base/.hashl.db"; +my $db_file = '.hashl.db'; my $total = 0; my $cur = 0; my $timer; @@ -30,6 +30,10 @@ GetOptions( 'd|database=s' => \$db_file, ); +if (substr($db_file, 0, 1) ne '/') { + $db_file = "${base}/${db_file}"; +} + my $action = $ARGV[0]; if (not defined $action) { |