On Windows, avoid using rsync for file-to-file copies, since rsync is not always available there.

Installing git-annex with stack rsync won't be available.
Also, using the git-annex installer with 64 bit git installs a non-working
rsync binary because it's linked with libraries provided by 32 bit git.
This commit is contained in:
Joey Hess 2019-02-18 17:27:34 -04:00
parent 1a367cad83
commit 9f6b7d6258
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 5 additions and 1 deletions

View file

@ -709,7 +709,9 @@ onLocalFast repo r a = onLocal repo r $ Annex.BranchState.disableUpdate >> a
rsyncOrCopyFile :: [CommandParam] -> FilePath -> FilePath -> MeterUpdate -> Annex Bool
rsyncOrCopyFile rsyncparams src dest p =
#ifdef mingw32_HOST_OS
dorsync
-- rsync is only available on Windows in some inatallation methods,
-- and is not strictly needed here, so don't use it.
docopy
where
#else
ifM (sameDeviceIds src dest) (docopy, dorsync)