Explorar o código

! Don't count index.php and .htaccess towards number of files in directory, per #597

Signed-off-by: Michael Eshom <[email protected]>
Michael Eshom %!s(int64=10) %!d(string=hai) anos
pai
achega
a008e0c4d0
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Sources/Subs-Attachments.php

+ 1 - 1
Sources/Subs-Attachments.php

@@ -586,7 +586,7 @@ function attachmentChecks($attachID)
 		}
 
 		// // No room left.... What to do now???
-		if (!empty($modSettings['attachmentDirFileLimit']) && $context['dir_files'] + 2 > $modSettings['attachmentDirFileLimit']
+		if (!empty($modSettings['attachmentDirFileLimit']) && $context['dir_files'] - 2 > $modSettings['attachmentDirFileLimit']
 			|| (!empty($modSettings['attachmentDirSizeLimit']) && $context['dir_size'] > $modSettings['attachmentDirSizeLimit'] * 1024))
 		{
 			if (!empty($modSettings['automanage_attachments']) && $modSettings['automanage_attachments'] == 1)