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
|
a
|
||||||
|
|
||||||
removeDirectoryForCleanup :: FilePath -> IO ()
|
removeDirectoryForCleanup :: FilePath -> IO ()
|
||||||
#if MIN_VERSION_directory(1,2,7)
|
|
||||||
removeDirectoryForCleanup = removePathForcibly
|
removeDirectoryForCleanup = removePathForcibly
|
||||||
#else
|
|
||||||
removeDirectoryForCleanup = removeDirectoryRecursive
|
|
||||||
#endif
|
|
||||||
|
|
||||||
cleanup :: FilePath -> IO ()
|
cleanup :: FilePath -> IO ()
|
||||||
cleanup dir = whenM (doesDirectoryExist dir) $ do
|
cleanup dir = whenM (doesDirectoryExist dir) $ do
|
||||||
|
|
|
@ -78,11 +78,7 @@ removeOldDb :: FilePath -> Annex ()
|
||||||
removeOldDb db =
|
removeOldDb db =
|
||||||
whenM (liftIO $ doesDirectoryExist db) $ do
|
whenM (liftIO $ doesDirectoryExist db) $ do
|
||||||
v <- liftIO $ tryNonAsync $
|
v <- liftIO $ tryNonAsync $
|
||||||
#if MIN_VERSION_directory(1,2,7)
|
|
||||||
removePathForcibly db
|
removePathForcibly db
|
||||||
#else
|
|
||||||
removeDirectoryRecursive db
|
|
||||||
#endif
|
|
||||||
case v of
|
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."
|
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 ()
|
Right () -> return ()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue