Prechádzať zdrojové kódy

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

Signed-off-by: Michael Eshom <[email protected]>
Michael Eshom 10 rokov pred
rodič
commit
a008e0c4d0
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  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)