This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: unison doesn't honor HOME when USERPROFILE is set, also permission/uid/gid problems when synchronizing


>     > (1) Unison is looking in $UNISON last.  This is clearly wrong, 
and if 
>     > fixed would allow you to solve your problem by setting 
>     > UNISON=/home/volker/.unison.  But here's something I don't understand:  
>     > on my Cygwin host both UNISON and USERPROFILE are set, but UNISON takes 
>     > precedence. ?? Are you sure this section of code is the operative one 
>     > here?  What happens if you export UNISON=/home/vzell/.unison?
> 
> In that case it will use $UNISON.
> According to the file strings.ml:
> 
>       \032  Unison stores a variety of information in a private directory on each\n\
>       \032  host. If the environment variable UNISON is defined, then its value\n\
>       \032  will be used as the name of this directory. If UNISON is not defined,\n\
>       \032  then the name of the directory depends on which operating system you\n\
>       \032  are using. In Unix, the default is to use $HOME/.unison. In Windows,\n\
>       \032  if the environment variable USERPROFILE is defined, then the directory\n\
>       \032  will be $USERPROFILE\\.unison; otherwise if HOME is defined, it will be\n\
>       \032  $HOME\\.unison; otherwise, it will be c:\\.unison.\n\
>       \032  \n\

Okay, but that's not what the code snippet you cited appears to show:

   match osType with
     `Win32 ->
       let dirString =
         try Unix.getenv "USERPROFILE" (* Windows NT/2K *)
         with Not_found ->
         try Unix.getenv "HOME" (* Windows 9x with Cygwin HOME set *)
         with Not_found ->
         try Unix.getenv "UNISON" (* Use UNISON dir if none of
                                     the above are set *)
         with Not_found -> "c:/" (* Default *) in

I don't know OCaml, but that sure looks to me as though $UNISON is only 
used if $USERPROFILE and $HOME are not set.  And yet that behavior 
doesn't match what I observe on my host.  So that's why I asked, what 
happens if you export UNISON=/home/volker/.unison and rerun?  Does 
unison use $UNISON, or $USERPROFILE/.unison?


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]