fix build
This commit is contained in:
parent
6eb52cf5f1
commit
01acb5212e
2 changed files with 8 additions and 9 deletions
|
@ -88,17 +88,16 @@ makeHardLink file key = do
|
|||
|
||||
fixSymlink :: FilePath -> FilePath -> CommandPerform
|
||||
fixSymlink file link = do
|
||||
liftIO $ do
|
||||
#if ! defined(mingw32_HOST_OS)
|
||||
-- preserve mtime of symlink
|
||||
mtime <- catchMaybeIO $ modificationTimeHiRes
|
||||
<$> getSymbolicLinkStatus file
|
||||
-- preserve mtime of symlink
|
||||
mtime <- liftIO $ catchMaybeIO $ modificationTimeHiRes
|
||||
<$> getSymbolicLinkStatus file
|
||||
#endif
|
||||
createWorkTreeDirectory (parentDir file)
|
||||
removeFile file
|
||||
createSymbolicLink link file
|
||||
createWorkTreeDirectory (parentDir file)
|
||||
liftIO $ removeFile file
|
||||
liftIO $ createSymbolicLink link file
|
||||
#if ! defined(mingw32_HOST_OS)
|
||||
maybe noop (\t -> touch file t False) mtime
|
||||
liftIO $ maybe noop (\t -> touch file t False) mtime
|
||||
#endif
|
||||
next $ cleanupSymlink file
|
||||
|
||||
|
|
|
@ -219,7 +219,7 @@ fixLink key file = do
|
|||
go want have
|
||||
| want /= fromRawFilePath (fromInternalGitPath have) = do
|
||||
showNote "fixing link"
|
||||
liftIO $ createWorkTreeDirectory (parentDir (fromRawFilePath file))
|
||||
createWorkTreeDirectory (parentDir (fromRawFilePath file))
|
||||
liftIO $ removeFile (fromRawFilePath file)
|
||||
addAnnexLink want file
|
||||
| otherwise = noop
|
||||
|
|
Loading…
Reference in a new issue