X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=febootstrap.ml;h=7e48206e88ac6e3f97a9cda80fbcb3a16c80074e;hb=df569d49aa10af5995f771362ddc1400f16486e8;hp=dc44d3dfd56502c42ab657e57ebdcabbc05d3fc2;hpb=48ba44a6751f5455a3afb37fb5809abc507696e1;p=febootstrap.git diff --git a/febootstrap.ml b/febootstrap.ml index dc44d3d..7e48206 100644 --- a/febootstrap.ml +++ b/febootstrap.ml @@ -72,6 +72,20 @@ let () = ) packages ) in + (* Canonicalize the name of directories, so that /a and /a/ are the same. *) + let files = + List.map ( + fun (filename, ft, pkg) -> + let len = String.length filename in + let filename = + if len > 1 (* don't rewrite "/" *) && ft.ft_dir + && filename.[len-1] = '/' then + String.sub filename 0 (len-1) + else + filename in + (filename, ft, pkg) + ) files in + (* Sort and combine duplicate files. *) let files = let files = List.sort compare files in