if ((path == (const char *) NULL) || (*path == '\0'))
return(MagickFalse);
exception=AcquireExceptionInfo();
- passes=(char *) GetImageRegistry(StringRegistryType,"shred-passes",
- exception);
+ passes=(char *) GetImageRegistry(StringRegistryType,"shred-passes",exception);
exception=DestroyExceptionInfo(exception);
if (passes == (char *) NULL)
passes=GetEnvironmentValue("MAGICK_SHRED_PASSES");
}
file=open_utf8(path,O_WRONLY | O_EXCL | O_BINARY,S_MODE);
if (file == -1)
- return(MagickFalse);
+ {
+ /*
+ Don't shred the file, just remove it.
+ */
+ status=remove_utf8(path);
+ return(MagickFalse);
+ }
/*
Shred the file.
*/
status=remove_utf8(path);
if (status == -1)
return(MagickFalse);
- return(i < StringToInteger(passes) ? MagickFalse : MagickTrue);
+ return(i < (ssize_t) StringToInteger(passes) ? MagickFalse : MagickTrue);
}
\f
/*