Skip to content

Commit

Permalink
allow units greater than bytes for size in file.tidied
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasmhughes authored and Megan Wilhite committed Apr 11, 2022
1 parent bf6cbc7 commit 20dfcdc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions salt/states/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -2032,6 +2032,11 @@ def tidied(
time_comparison = "atime"
time_comparison = time_comparison.lower()

# Convert size with human units to bytes
if isinstance(size, str):
# add handle_metric=True when #61833 is merged
size = salt.utils.stringutils.human_to_bytes(size)

# Define some variables
todelete = []
today = date.today()
Expand Down

0 comments on commit 20dfcdc

Please sign in to comment.