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