From 37c8dc60d947f61397f6599adc6cd24fbc47f559 Mon Sep 17 00:00:00 2001 From: mysticbbs Date: Sun, 2 Sep 2012 21:13:18 -0400 Subject: [PATCH] Ratio enforcement update --- mystic/mis_client_ftp.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mystic/mis_client_ftp.pas b/mystic/mis_client_ftp.pas index d7a217b..ae745f6 100644 --- a/mystic/mis_client_ftp.pas +++ b/mystic/mis_client_ftp.pas @@ -224,13 +224,13 @@ Begin Exit; End; - If SecLevel.DLRatio > 0 Then + If (SecLevel.DLRatio > 0) and ((User.DLs <> 0) or (User.ULs <> 0)) Then If (User.ULs * SecLevel.DLRatio) <= (User.DLs + 1) Then Begin Result := 3; Exit; End; - If SecLevel.DLKRatio > 0 Then + If (SecLevel.DLKRatio > 0) and ((User.DLs <> 0) or (User.ULs <> 0)) Then If (User.ULk * SecLevel.DLkRatio) <= (User.DLk + (FDir.Size DIV 1024)) Then Begin Result := 3; Exit;