[Unison-hackers] patches for 2.10.2 and 2.12.0

Jerome Vouillon Jerome.Vouillon at pps.jussieu.fr
Mon May 23 14:52:32 EDT 2005


On Mon, May 23, 2005 at 01:51:19PM +0200, Jerome Vouillon wrote:
> This one is only needed under Windows.  I'm attaching a more thorough
> patch that supersedes it.

Here it is...

-- Jerome
-------------- next part --------------
--- os.ml.orig	2005-05-23 13:46:13.995059682 +0200
+++ os.ml	2005-05-23 13:46:25.872112048 +0200
@@ -167,14 +167,19 @@
        let absolutePath = Fspath.concatToString fspath path in
        match (Fileinfo.get false fspath path).Fileinfo.typ with
          `DIRECTORY ->
-           Unix.chmod absolutePath 0o700;
+           begin try
+             Unix.chmod absolutePath 0o700
+           with Unix.Unix_error _ -> () end;
            Safelist.iter
              (fun child -> delete fspath (Path.child path child))
              (childrenOf fspath path);
            Unix.rmdir absolutePath
        | `FILE ->
-           if Util.osType <> `Unix then
-             Unix.chmod absolutePath 0o600;
+           if Util.osType <> `Unix then begin
+             try
+               Unix.chmod absolutePath 0o600;
+             with Unix.Unix_error _ -> ()
+           end;
            Unix.unlink absolutePath;
            if Prefs.read Osx.rsrc then begin
              let pathDouble = Osx.appleDoubleFile fspath path in


More information about the Unison-hackers mailing list