diff --git a/Cabal-syntax.cabal b/Cabal-syntax.cabal
--- a/Cabal-syntax.cabal
+++ b/Cabal-syntax.cabal
@@ -1,6 +1,6 @@
 cabal-version: 3.6
 name:          Cabal-syntax
-version:       3.18.1.0
+version:       3.18.2.0
 copyright:     2003-2026, Cabal Development Team (see AUTHORS file)
 license:       BSD-3-Clause
 license-file:  LICENSE
diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,1 +1,1 @@
-Please see https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.18.1.0.md
+Please see https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.18.2.0.md
diff --git a/src/Distribution/CabalSpecVersion.hs b/src/Distribution/CabalSpecVersion.hs
--- a/src/Distribution/CabalSpecVersion.hs
+++ b/src/Distribution/CabalSpecVersion.hs
@@ -72,7 +72,7 @@
 showCabalSpecVersion CabalSpecV1_0 = "1.0"
 
 cabalSpecLatest :: CabalSpecVersion
-cabalSpecLatest = CabalSpecV3_16
+cabalSpecLatest = CabalSpecV3_18
 
 -- | Parse 'CabalSpecVersion' from version digits.
 --
diff --git a/src/Distribution/Utils/Generic.hs b/src/Distribution/Utils/Generic.hs
--- a/src/Distribution/Utils/Generic.hs
+++ b/src/Distribution/Utils/Generic.hs
@@ -211,7 +211,7 @@
       -- UnsupportedOperation means EXDEV from rename(2) with source and target
       -- on different devices. In such case we resort to copying instead of renaming.
       | ioeGetErrorType exception == UnsupportedOperation =
-          copyFile srcPath targetPath `Exception.catch` retryCopy (retriesLeft - 1)
+          retryCopy retriesLeft exception
       | otherwise = do
           -- Wait 1ms between retries: maybe device is busy, maybe antivirus locked srcPath.
           threadDelay 1000
@@ -222,7 +222,7 @@
     retryCopy retriesLeft _ = do
       -- Wait 1ms between retries: maybe device is busy, maybe antivirus locked srcPath.
       threadDelay 1000
-      copyFile srcPath targetPath `Exception.catch` retryCopy retriesLeft
+      copyFile srcPath targetPath `Exception.catch` retryCopy (retriesLeft - 1)
       -- It's nice to clean up, but not critical, so ignoring any exceptions.
       removeFile srcPath `Exception.catch` (\(_ :: IOException) -> pure ())
 
