remove support for directory < 1.2.7

The build depends already require 1.2.7, so these old ifdefs must be
unnecessary.
This commit is contained in:
Joey Hess 2024-02-06 10:53:13 -04:00
parent 8f00cca06e
commit d41e6990c0
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 0 additions and 8 deletions

View file

@ -326,11 +326,7 @@ setTestEnv a = Utility.Tmp.Dir.withTmpDir "testhome" $ \tmphome -> do
a
removeDirectoryForCleanup :: FilePath -> IO ()
#if MIN_VERSION_directory(1,2,7)
removeDirectoryForCleanup = removePathForcibly
#else
removeDirectoryForCleanup = removeDirectoryRecursive
#endif
cleanup :: FilePath -> IO ()
cleanup dir = whenM (doesDirectoryExist dir) $ do

View file

@ -78,11 +78,7 @@ removeOldDb :: FilePath -> Annex ()
removeOldDb db =
whenM (liftIO $ doesDirectoryExist db) $ do
v <- liftIO $ tryNonAsync $
#if MIN_VERSION_directory(1,2,7)
removePathForcibly db
#else
removeDirectoryRecursive db
#endif
case v of
Left ex -> giveup $ "Failed removing old database directory " ++ db ++ " during upgrade (" ++ show ex ++ ") -- delete that and re-run git-annex to finish the upgrade."
Right () -> return ()