Added check for a directory whith original images.

This commit is contained in:
Denis Fedoseev 2011-07-03 10:45:40 +04:00
parent 014f80624f
commit 1e42ed051e

View file

@ -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";
}