Skip to content

Commit 20dfcdc

Browse files
nicholasmhughesMegan Wilhite
authored and
Megan Wilhite
committed
allow units greater than bytes for size in file.tidied
1 parent bf6cbc7 commit 20dfcdc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

salt/states/file.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2032,6 +2032,11 @@ def tidied(
20322032
time_comparison = "atime"
20332033
time_comparison = time_comparison.lower()
20342034

2035+
# Convert size with human units to bytes
2036+
if isinstance(size, str):
2037+
# add handle_metric=True when #61833 is merged
2038+
size = salt.utils.stringutils.human_to_bytes(size)
2039+
20352040
# Define some variables
20362041
todelete = []
20372042
today = date.today()

0 commit comments

Comments
 (0)