revert change that broke test_readonly
commit 63d508e885
broke test_readonly.
When a local git remote is readonly, tryCopyCoW run to copy a file
from it failed at withOtherTmp.
Sponsored-by: Dartmouth College's Datalad project
This commit is contained in:
parent
a92427c0d3
commit
7ccf642863
4 changed files with 10 additions and 27 deletions
|
@ -56,13 +56,11 @@ copyFileExternal meta src dest = do
|
|||
| otherwise = copyMetaDataParams meta
|
||||
|
||||
{- When a filesystem supports CoW (and cp does), uses it to make
|
||||
- an efficient copy of a file. Otherwise, returns False.
|
||||
-
|
||||
- The dest file must not exist yet, or it will fail to make a CoW copy,
|
||||
- and will return False. -}
|
||||
- an efficient copy of a file. Otherwise, returns False. -}
|
||||
copyCoW :: CopyMetaData -> FilePath -> FilePath -> IO Bool
|
||||
copyCoW meta src dest
|
||||
| BuildInfo.cp_reflink_supported = do
|
||||
void $ tryIO $ removeFile dest
|
||||
-- When CoW is not supported, cp will complain to stderr,
|
||||
-- so have to discard its stderr.
|
||||
ok <- catchBoolIO $ withNullHandle $ \nullh ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue