r11542@llin: dpavlin | 2005-12-05 16:48:07 +0100
authorDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 5 Dec 2005 17:48:14 +0000 (17:48 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 5 Dec 2005 17:48:14 +0000 (17:48 +0000)
 fix path generation /path/to/db/database/prefix#id

git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@220 07558da8-63fa-0310-ba24-9fe276d99e06

lib/WebPAC/Store.pm

index b15d42e..73345f5 100644 (file)
@@ -166,11 +166,11 @@ sub load_ds {
 
        $log->logconfess("can't find database name") unless ($database);
 
-       my $cache_file = "$cache_path/$prefix/$database#$id";
+       my $cache_file = "$cache_path/$prefix#$id";
        $cache_file =~ s#//#/#go;
 
 open(my $fh, '>>', '/tmp/foo');
-print $fh "$cache_file\n";
+print $fh "LOAD $cache_path / $prefix # $id ==> $cache_file\n";
 close($fh);
 
        $log->debug("using cache_file $cache_file");
@@ -230,7 +230,7 @@ sub save_ds {
 
        my $prefix = $arg->{prefix} || '';
 
-       my $cache_file = $self->{path} . "/$prefix/$database#" . $arg->{id};
+       my $cache_file = $self->{path} . "/$prefix#" . $arg->{id};
        $cache_file =~ s#//#/#go;
 
        $log->debug("creating storable cache file $cache_file");