use RawFilePath getFileStatus for speed
Only done on those calls to getFileStatus that had a RawFilePath, not a FilePath. The others would probably be just as fast if converted to use it with toRawFilePath, but I'm not 100% sure. Note that genInodeCache' uses fromRawFilePath, but that value only gets used on Windows, so on unix the thunk will never be evaluated.
This commit is contained in:
parent
0e9d699ef3
commit
5f391179f1
9 changed files with 36 additions and 21 deletions
|
@ -35,6 +35,7 @@ import qualified Database.Fsck as FsckDb
|
|||
import Types.CleanupActions
|
||||
import Types.Key
|
||||
import Types.ActionItem
|
||||
import qualified Utility.RawFilePath as R
|
||||
|
||||
import Data.Time.Clock.POSIX
|
||||
import System.Posix.Types (EpochTime)
|
||||
|
@ -327,7 +328,7 @@ verifyWorkTree key file = do
|
|||
Just k | k == key -> whenM (inAnnex key) $ do
|
||||
showNote "fixing worktree content"
|
||||
replaceFile (fromRawFilePath file) $ \tmp -> do
|
||||
mode <- liftIO $ catchMaybeIO $ fileMode <$> getFileStatus (fromRawFilePath file)
|
||||
mode <- liftIO $ catchMaybeIO $ fileMode <$> R.getFileStatus file
|
||||
ifM (annexThin <$> Annex.getGitConfig)
|
||||
( void $ linkFromAnnex key tmp mode
|
||||
, do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue