Skip to content

Commit

Permalink
system:shred value has precedence over MAGICK_SHRED_PASSES
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Jun 6, 2022
1 parent 1671346 commit a29777d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions magick/utility.c
Original file line number Diff line number Diff line change
Expand Up @@ -1874,13 +1874,20 @@ MagickPrivate MagickBooleanType ShredFile(const char *path)
*property;

property=GetPolicyValue("system:shred");
if (property == (char *) NULL)
property=GetEnvironmentValue("MAGICK_SHRED_PASSES");
if (property != (char *) NULL)
{
passes=(ssize_t) StringToInteger(property);
property=DestroyString(property);
}
if (passes == -1)
{
property=GetEnvironmentValue("MAGICK_SHRED_PASSES");
if (property != (char *) NULL)
{
passes=(ssize_t) StringToInteger(property);
property=DestroyString(property);
}
}
}
if (passes <= 0)
{
Expand Down

0 comments on commit a29777d

Please sign in to comment.