From 1e42ed051ea9f8237ae9ff52b030268f8b13a805 Mon Sep 17 00:00:00 2001 From: Denis Fedoseev Date: Sun, 3 Jul 2011 10:45:40 +0400 Subject: [PATCH] Added check for a directory whith original images. --- fotostore.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fotostore.pl b/fotostore.pl index 91ba225..3599998 100644 --- a/fotostore.pl +++ b/fotostore.pl @@ -21,6 +21,8 @@ my $IMAGE_DIR = app->static->root . $IMAGE_BASE; # Create directory if not exists unless (-d $IMAGE_DIR) { mkpath $IMAGE_DIR or die "Cannot create directory: $IMAGE_DIR"; +} +unless (-d $IMAGE_DIR.$ORIG_DIR) { mkpath $IMAGE_DIR.$ORIG_DIR or die "Cannot create directory: $IMAGE_DIR$ORIG_DIR"; }