On a couple of hosts I've worked with, the temp directory is cleaned up periodically.

When creating a lockfile, imagecache fails to create its lockfile, since the preset directory doesn't exist.

This is a simple 3 line patch that will check for the directory and create it before attempting to write out the lockfile.

CommentFileSizeAuthor
imagecache.mkdir_.patch510 bytesIncrediblyKenzi

Comments

drewish’s picture

I'm not sure I follow what's going on here--though I'll confess I didn't write this bit of code so I'm not super familiar with its operation. Looking at it I don't see the lockfile created in a sub-directory:

$lockfile = file_directory_temp() .'/'. $preset['presetname'] . basename($src);

Or are you suggesting that we should do it in a sub-directory?

drewish’s picture

oh, also per the drupal coding standards, true should be in caps.

fizk’s picture

Status: Needs review » Closed (won't fix)