From: Dirk Lemstra Date: Fri, 2 Feb 2018 13:44:25 +0000 (+0100) Subject: Added a check for the cache path to avoid incorrect error message in the debug log. X-Git-Tag: 7.0.7-23~190 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=38ac1b5d41572704e2900ab5e359b70f3efae4c7;p=imagemagick Added a check for the cache path to avoid incorrect error message in the debug log. --- diff --git a/MagickCore/resource.c b/MagickCore/resource.c index 23ebc5ad9..09352f330 100644 --- a/MagickCore/resource.c +++ b/MagickCore/resource.c @@ -1209,7 +1209,8 @@ MagickExport MagickBooleanType RelinquishUniqueFileResource(const char *path) UnlockSemaphoreInfo(resource_semaphore); (void) CopyMagickString(cache_path,path,MagickPathExtent); AppendImageFormat("cache",cache_path); - (void) ShredFile(cache_path); + if (access_utf8(cache_path,F_OK) == 0) + (void) ShredFile(cache_path); if (status == MagickFalse) status=ShredFile(path); return(status);