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:
parent
8f00cca06e
commit
d41e6990c0
2 changed files with 0 additions and 8 deletions
|
@ -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
|
||||
|
|
|
@ -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 ()
|
||||
|
|
Loading…
Reference in a new issue