]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 11 Mar 2012 02:56:37 +0000 (02:56 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 11 Mar 2012 02:56:37 +0000 (02:56 +0000)
MagickCore/delegate.c

index 73a98f74abf9006d884da82d9df70755b31d7a75..2cff2b5c117395c71f5c2e05af525cee042071a6 100644 (file)
@@ -763,6 +763,9 @@ static MagickBooleanType CopyDelegateFile(const char *source,
     destination_file,
     source_file;
 
+  MagickBooleanType
+    status;
+
   register size_t
     i;
 
@@ -784,6 +787,9 @@ static MagickBooleanType CopyDelegateFile(const char *source,
   */
   assert(source != (const char *) NULL);
   assert(destination != (char *) NULL);
+  status=GetPathAttributes(destination,&attributes);
+  if ((status != MagickFalse) && (attributes.st_size != 0))
+    return(MagickTrue);
   destination_file=open_utf8(destination,O_WRONLY | O_BINARY | O_CREAT,S_MODE);
   if (destination_file == -1)
     return(MagickFalse);