avoid unix-compat's rename
On Windows, that does not support long paths https://github.com/jacobstanley/unix-compat/issues/56 Instead, use System.Directory.renamePath, which does support long paths. Sponsored-by: Dartmouth College's Datalad project
This commit is contained in:
parent
bad39cadc6
commit
2d65c4ff1d
18 changed files with 75 additions and 20 deletions
|
@ -47,6 +47,7 @@ import Utility.Tmp.Dir
|
|||
import Utility.SshHost
|
||||
import Annex.SpecialRemote.Config
|
||||
import Annex.Verify
|
||||
import qualified Utility.RawFilePath as R
|
||||
|
||||
import qualified Data.Map as M
|
||||
|
||||
|
@ -224,7 +225,7 @@ store o k src meterupdate = storeGeneric o meterupdate basedest populatedest
|
|||
basedest = fromRawFilePath $ Prelude.head (keyPaths k)
|
||||
populatedest dest = liftIO $ if canrename
|
||||
then do
|
||||
rename src dest
|
||||
R.rename (toRawFilePath src) (toRawFilePath dest)
|
||||
return True
|
||||
else createLinkOrCopy (toRawFilePath src) (toRawFilePath dest)
|
||||
{- If the key being sent is encrypted or chunked, the file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue