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