Permalink
Browse files

[opam update] fix the failure to read Path.R.updated because it conta…

…ins wrong lines taken from the output of "rsync"
  • Loading branch information...
tuong committed Jul 27, 2012
1 parent ebe6aaa commit bb89d99e077a303f54670e7bd305fcd05638b09c
Showing with 10 additions and 1 deletion.
  1. +10 −1 src/repo/rsync/update.ml
View
@@ -27,7 +27,16 @@ let rsync ?fn dir =
List.fold_left (fun set f -> NV.Set.add f set) NV.Set.empty files
let () =
- let fn str = NV.of_filename (Filename.of_string str) in
+ let fn str =
+ let s = "deleting " in
+ if
+ Some true = try Some (String.sub str 0 (String.length s) = s) with _ -> None
+ then
+ (* WARNING if [str] looks like this value : "deleting NAME.VERSION.opam",
+ then we must not return [Some _] ! *)
+ None
+ else
+ NV.of_filename (Filename.of_string str) in
let opam = rsync ~fn "opam/" in
let descr = try rsync "descr/" with e -> let _ = Globals.warning "%s" (Printexc.to_string e) in NV.Set.empty in
let archives =

0 comments on commit bb89d99

Please sign in to comment.