aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGuillermo Ramos2019-06-25 01:37:52 +0200
committerGuillermo Ramos2019-06-25 01:37:52 +0200
commit07b8d3ee85ebd2cdd286c5d34f8143cef2379f7e (patch)
tree7d95fd3f700f151361e66ce53c6b2f2719477ccb /lib
parent0772df0d7ccd587ccbc8f6f2a3bb021f5388a06f (diff)
downloadtgutils-07b8d3ee85ebd2cdd286c5d34f8143cef2379f7e.tar.gz
Fix cache when .cache does not exist
Diffstat (limited to 'lib')
-rw-r--r--lib/TgLib/Cache.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/TgLib/Cache.pm b/lib/TgLib/Cache.pm
index d3723b7..b6bb9e6 100644
--- a/lib/TgLib/Cache.pm
+++ b/lib/TgLib/Cache.pm
@@ -2,6 +2,7 @@ package TgLib::Cache;
use Storable qw<store retrieve>;
use File::Basename qw<dirname>;
+use File::Path qw<make_path>;
use TgLib::Env qw<$CACHE_HOME>;
@@ -27,7 +28,7 @@ sub offset {
sub save {
my $cache = shift;
- mkdir dirname $CACHE_FILE;
+ make_path dirname $CACHE_FILE;
store($cache, $CACHE_FILE);
}