]> granicus.if.org Git - imagemagick/commitdiff
Added a check for the cache path to avoid incorrect error message in the debug log.
authorDirk Lemstra <dirk@git.imagemagick.org>
Fri, 2 Feb 2018 13:44:25 +0000 (14:44 +0100)
committerDirk Lemstra <dirk@git.imagemagick.org>
Fri, 2 Feb 2018 13:44:35 +0000 (14:44 +0100)
MagickCore/resource.c

index 23ebc5ad903d1722d83b0ada7a8ce3bc9dcc0d68..09352f330d3d2965d01c37b094175523a49c3d89 100644 (file)
@@ -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);