diff options
author | Benjamin Pierce <bcpierce00@gmail.com> | 2017-11-25 07:25:52 -0500 |
---|---|---|
committer | Benjamin Pierce <bcpierce00@gmail.com> | 2017-11-25 07:25:52 -0500 |
commit | c13b0c07c0c286c0dfc728c7ff3e83c00545d860 (patch) | |
tree | f392183e373fb1237f21c92ed1c8f2e37dae19ba /src | |
parent | 472c4f964d5f6a90d91b0f624e371d2cf446803b (diff) | |
download | unison-c13b0c07c0c286c0dfc728c7ff3e83c00545d860.zip unison-c13b0c07c0c286c0dfc728c7ff3e83c00545d860.tar.gz unison-c13b0c07c0c286c0dfc728c7ff3e83c00545d860.tar.bz2 |
Fix issue #87 -- a chmod not protected by the dontChmod flag
Diffstat (limited to 'src')
-rw-r--r-- | src/copy.ml | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/copy.ml b/src/copy.ml index 4068dac..6416013 100644 --- a/src/copy.ml +++ b/src/copy.ml @@ -15,7 +15,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. *) - let (>>=) = Lwt.bind let debug = Trace.debug "copy" @@ -260,7 +259,7 @@ let openFileOut fspath path kind len = let fullpath = Fspath.concat fspath path in let perm = 0o600 in let ch = Fs.open_out_gen [Open_wronly; Open_binary] perm fullpath in - Fs.chmod fullpath perm; + if not (Prefs.read Props.dontChmod) then Fs.chmod fullpath perm; LargeFile.seek_out ch (Uutil.Filesize.toInt64 len); ch | `RESS -> |