[Unison-hackers] [unison-svn] r389 - in trunk: doc src src/lwt src/uimacnew src/uimacnew/English.lproj/MainMenu.nib src/uimacnew/uimacnew.xcodeproj

Benjamin Pierce bcpierce at cis.upenn.edu
Tue Jan 5 10:34:04 EST 2010


>> Modified: trunk/src/props.ml
>> ===================================================================
>> --- trunk/src/props.ml	2009-08-18 13:14:35 UTC (rev 388)
>> +++ trunk/src/props.ml	2009-11-29 13:56:09 UTC (rev 389)
>> @@ -215,7 +215,7 @@
>>
>> let check fspath path stats (fp, mask) =
>>   let fp' = stats.Unix.LargeFile.st_perm in
>> -  if fp land mask <> fp' land mask then
>> +  if (not (Prefs.read dontChmod)) && (fp land mask <> fp' land  
>> mask) then
>>     raise
>>       (Util.Transient
>>          (Format.sprintf
>>
>
> This looks wrong.  If Unison does not fail here when the permissions
> do not agree, it will report a spurious permission update next time it
> is run, as the archive contents will not be in agreement with the
> filesystem contents.
>
> I guess the correct fix is either the dontchmod preference should
> imply perms=0, or it should be ignored when the perms preference is
> not 0.

Thanks for noticing this, Jerome.  I'll shortly commit a fix  
implementing your first suggestion.  (I've chosen to raise an  
exception if dontchmod is set and perms<> 0, so users aren't confused  
by perms settings being ignored silently.)

    - B




More information about the Unison-hackers mailing list