# HG changeset patch # User Franck Deroche # Date 1284380885 -7200 # Node ID 1907129beb95c32d7b20e3c6d1f38aa47e5c1be2 # Parent da69ba21d0c34c349b9e3621b752b67f709d193c Thumbnails: Create the thumbnail directory if it doesn't exist yet diff -r da69ba21d0c3 -r 1907129beb95 scald_dailymotion.module --- a/scald_dailymotion.module Mon Jul 26 14:48:55 2010 +0200 +++ b/scald_dailymotion.module Mon Sep 13 14:28:05 2010 +0200 @@ -133,7 +133,7 @@ // to do interesting things when used with ImageCache for example. $thumb = drupal_http_request($infos->thumbnail['src']); $dir = file_directory_path() . '/dailymotion'; - if ($thumb->code == 200 && file_check_directory($dir)) { + if ($thumb->code == 200 && file_check_directory($dir, FILE_CREATE_DIRECTORY)) { $dest = $dir . '/' . $infos->id . '.jpg'; $file = file_save_data($thumb->data, $dest); }