mod_http_upload_quota: Fix "max_days" expiry run
Use the path names of old files to delete them (instead of the tuples returned by the gather_file_info/1 function).
This commit is contained in:
parent
655f195e9d
commit
eeba72cd4c
|
@ -276,8 +276,8 @@ enforce_quota(UserDir, SlotSize, _OldSize, MinSize, MaxSize) ->
|
|||
-spec delete_old_files(file:filename_all(), integer()) -> ok.
|
||||
|
||||
delete_old_files(UserDir, Timestamp) ->
|
||||
case lists:filter(fun({_Path, _Size, Time}) -> Time < Timestamp end,
|
||||
gather_file_info(UserDir)) of
|
||||
FileInfo = gather_file_info(UserDir),
|
||||
case [Path || {Path, _Size, Time} <- FileInfo, Time < Timestamp] of
|
||||
[] ->
|
||||
ok;
|
||||
OldFiles ->
|
||||
|
|
Loading…
Reference in New Issue