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:
Holger Weiss 2015-10-24 23:49:02 +02:00
parent 655f195e9d
commit eeba72cd4c
1 changed files with 2 additions and 2 deletions

View File

@ -276,8 +276,8 @@ enforce_quota(UserDir, SlotSize, _OldSize, MinSize, MaxSize) ->
-spec delete_old_files(file:filename_all(), integer()) -> ok. -spec delete_old_files(file:filename_all(), integer()) -> ok.
delete_old_files(UserDir, Timestamp) -> delete_old_files(UserDir, Timestamp) ->
case lists:filter(fun({_Path, _Size, Time}) -> Time < Timestamp end, FileInfo = gather_file_info(UserDir),
gather_file_info(UserDir)) of case [Path || {Path, _Size, Time} <- FileInfo, Time < Timestamp] of
[] -> [] ->
ok; ok;
OldFiles -> OldFiles ->