<div>Ok, with my 1 hour old ocaml skills i have fixed my problem by putting all the temp file info in the suffix rather than&nbsp;the prefix. This then lets the file extension remain&nbsp;invariant&nbsp;thuoghout the copy raname procedure.
</div>
<div>&nbsp;</div>
<div>Note, this is based on unison-2.13.16</div>
<div>&nbsp;</div>
<div>diff unison-2.13.16/os.ml unison-2.13.16_a/os.ml<br>375c375<br>&lt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Path.addSuffixToFinalName path s)<br>---<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Path.addPrefixToFinalName path s)</div>
<div>&nbsp;</div>
<div>However</div>
<div>&nbsp;</div>
<div>This leaves problems with the consistency of the code. Fisrt off tempFileSuffix is no loger used as a suffix so the namingis inconsistent and second off lines 138 and 139 are checking for files that end in tempFileSuffix, which will never exists.
</div>
<div>&nbsp;</div>
<div>Given my unison design and ocaml knowlege is very basic can anyone:</div>
<div>&nbsp;</div>
<div>a)&nbsp;let me know if my code change will cause anu disasters if I use it</div>
<div>b) suggest a putter code patch to solve my problem?</div>
<div>&nbsp;</div>
<div>Thanks</div>
<div>&nbsp;</div>
<div>Adam<br><br>&nbsp;</div>
<div><span class="gmail_quote">On 22/06/07, <b class="gmail_sendername">Adam Griffiths</b> &lt;<a href="mailto:aogriffiths@gmail.com">aogriffiths@gmail.com</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>OK i see. I have never programed caml before so I&#39;m a bit stuck. I looks like I need to edit lines some of the stuff between 368..382 and 137..147 could anyone help me workout what changes to make?&nbsp;</div>
<div>&nbsp;</div>
<div>Thanks</div>
<div>&nbsp;</div>
<div>Adam</div>
<div>&nbsp;</div>
<div>PS, it seems more appropriate to continue this thread on&nbsp;the unison-hackers mailing list.<br><br>&nbsp;</div>
<div><span class="e" id="q_11353045fe9ec3d5_1">
<div><span class="gmail_quote">On 21/06/07, <b class="gmail_sendername">Benjamin Pierce</b> &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:bcpierce@cis.upenn.edu" target="_blank">bcpierce@cis.upenn.edu 
</a>&gt; wrote:</span> 
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">You&#39;d need to rewrite some code involving tempFileSuffix in the file<br>os.ml...<br><br>Regards,<br><br>
&nbsp;&nbsp; - Benjamin<br><br>On Jun 21, 2007, at 11:40 AM, Adam wrote:<br><br>&gt; Hi I am working with a document storage system called &quot;LiveLink&quot;. I<br>&gt; assess all LiveLink documents over WebDAV mounted as a network drive 
<br>&gt; in windows. When I am out of the office I am keeping an offline<br>&gt; replica&nbsp;&nbsp;of these files in case I need to read or edit them. I am<br>&gt; using unison to maintain the replica between the offline copy on my 
<br>&gt; laptop D:\ drive and the webdav copy mounted on a network share Z:\.<br>&gt;<br>&gt; This works fine... except...<br>&gt;<br>&gt; LiveLink does something special. When ever you create a file LiveLink<br>&gt; records some metadata about it, including its MIME type. All files 
<br>&gt; uploaded by unison are copied to LiveLink with a unison.tmp<br>&gt; extension, so LiveLink sets the MIME type as application/octet-<br>&gt; stream. Unison then renames the file to have it&#39;s correct extension, 
<br>&gt; say &quot;.doc&quot; (which should have a MIME type of application/msword) but<br>&gt; LiveLink does not update the metadata on rename, it only sets it at<br>&gt; the time the file is created.<br>&gt;<br>&gt; This leaves me having used unison to upload multiple .doc .xls .mpp 
<br>&gt; files (all ms document formats) into LiveLink and live link having<br>&gt; them set with the wrong MIME type - so whenever anyone I work with<br>&gt; trys to download them the browser is told they are application/octet- 
<br>&gt; stream files and saves them as .doc.bin .doc.xls .doc.mpp<br>&gt; respectively.<br>&gt;<br>&gt; Is there anything I can do to prevent this. The organisation I work<br>&gt; for (and the organisation that builds LiveLink) are large and are not 
<br>&gt; going to change LiveLink to be more compatible with unison I&#39;m<br>&gt; afraid. What I&#39;m really looking for is a unison option or hack that<br>&gt; uploads the files with the correct extension.<br>&gt;<br>
&gt; Thanks<br>&gt;<br>&gt; Adam<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; Yahoo! Groups Links<br>&gt;<br>&gt; &lt;*&gt; To visit your group on the web, go to:<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://groups.yahoo.com/group/unison-users/" target="_blank">
http://groups.yahoo.com/group/unison-users/</a><br>&gt;<br>&gt; &lt;*&gt; Your email settings:<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Individual Email | Traditional<br>&gt;<br>&gt; &lt;*&gt; To change settings online go to:<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://groups.yahoo.com/group/unison-users/join" target="_blank">
http://groups.yahoo.com/group/unison-users/join</a><br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; (Yahoo! ID required)<br>&gt;<br>&gt; &lt;*&gt; To change settings via email:<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; mailto:<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:unison-users-digest@yahoogroups.com" target="_blank">
 unison-users-digest@yahoogroups.com </a><br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; mailto:<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:unison-users-fullfeatured@yahoogroups.com" target="_blank">unison-users-fullfeatured@yahoogroups.com 
</a><br>&gt;<br>&gt; &lt;*&gt; To unsubscribe from this group, send an email to:<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:unison-users-unsubscribe@yahoogroups.com" target="_blank">
unison-users-unsubscribe@yahoogroups.com</a><br>&gt;<br>&gt; &lt;*&gt; Your use of Yahoo! Groups is subject to:<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://docs.yahoo.com/info/terms/" target="_blank">
http://docs.yahoo.com/info/terms/</a><br>&gt;<br><br></blockquote></div><br></span></div></blockquote></div><br>