more RawFilePath conversion

removeFile changed to removeLink, because AFAICS it should be fine to
remove non-file things here. In particular, it's fine to remove a
symlink, since we're about to write a symlink. (removeLink does not
remove directories, so file, symlink, and unix socket are the only
possibilities.)
This commit is contained in:
Joey Hess 2020-10-30 13:07:41 -04:00
parent 8f452416f7
commit ca80c3154c
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
6 changed files with 13 additions and 13 deletions

View file

@ -106,7 +106,7 @@ scanUnlockedFiles = whenM (inRepo Git.Ref.headExists <&&> not <$> isBareRepo) $
fileMode <$> R.getFileStatus f
ic <- replaceWorkTreeFile (fromRawFilePath f) $ \tmp -> do
let tmp' = toRawFilePath tmp
linkFromAnnex k tmp destmode >>= \case
linkFromAnnex k tmp' destmode >>= \case
LinkAnnexOk ->
withTSDelta (liftIO . genInodeCache tmp')
LinkAnnexNoop -> return Nothing