diff options
author | Benjamin Pierce <bcpierce00@gmail.com> | 2016-04-02 15:50:48 -0400 |
---|---|---|
committer | Benjamin Pierce <bcpierce00@gmail.com> | 2016-04-02 15:50:48 -0400 |
commit | ed12af1f890623b4aff8b08316ca473a00ebf45e (patch) | |
tree | 5c4a00b9dc4f0344c530d5021b38192e8aeff61d /src | |
parent | 0d3ad3b19e996ebba74c743a4f6853a8ce59d148 (diff) | |
download | unison-ed12af1f890623b4aff8b08316ca473a00ebf45e.zip unison-ed12af1f890623b4aff8b08316ca473a00ebf45e.tar.gz unison-ed12af1f890623b4aff8b08316ca473a00ebf45e.tar.bz2 |
Proposed fix
Diffstat (limited to 'src')
-rw-r--r-- | src/copy.ml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/copy.ml b/src/copy.ml index b9e10f6..19c2370 100644 --- a/src/copy.ml +++ b/src/copy.ml @@ -1004,7 +1004,14 @@ let recursively fspathFrom pathFrom fspathTo pathTo = let ch = Os.childrenOf fspathFrom pFrom in Safelist.iter (fun n -> copy (Path.child pFrom n) (Path.child pTo n)) ch - | `ABSENT -> assert false in + | `ABSENT -> + (* BCP 4/16: Was "assert false", but this causes unison to + crash when (1) the copyonconflict preference is used, (2) + there is a conflict between a deletion and a change, and + (3) the change is propagated on top of the deletion. Seems + better to silently ignore the copy request. *) + () + in debug (fun () -> Util.msg " Copying recursively %s / %s\n" (Fspath.toDebugString fspathFrom) (Path.toString pathFrom)); copy pathFrom pathTo; |