Subject: Re: How to fix CRLF stuff...
From: Peter DiCamillo (Peter_DiCamillo@brown.edu)
Date: Tue Feb 13 2001 - 20:09:03 EST
Jeremy Buchmann wrote:
>Okay, this seems to be getting very complicated...is there a more simple
>approach?
There is a much simpler approach if the goal is only to avoid the 
"corruption" that happens when applications like the Finder and 
StuffIt change the type to TEXT after creating the file.  While I 
like the idea of comprehensive solution to the CR/LF problem, this 
simpler approach would solve the only serious problem we have with it 
here.  My idea is the following:
1. Define a new "suppress CR/LF translation" bit in the AppleDouble 
file.  The bit would be off for files created by previous versions of 
netatalk, and assumed off if the AppleDouble file isn't present.
2. When afpd creates a new file, the suppress translation bit is set 
if the file is not translated at that time.
3. When serving a file, the test for whether or not to translate it 
would be unchanged if the suppress bit off.  However, if the bit is 
on, the file is not translated.
With this approach, a Mac user could use the Finder to copy a TEXT 
file to a netatalk volume and back again without the file changing, 
although it would not be translated for Unix users.  This would be 
compatible with a more comprehensive solution where afpd could be 
told to either translate or not translate a given file.  When the 
suppress bit is off, setting the file's type to TEXT would force 
translation, and would also be useful to the Mac user.
Peter
This archive was generated by hypermail 2b28 : Sun Oct 14 2001 - 03:04:32 EDT