Subject: Filename Length Trickery

From: Alon <[email-masked]>
Date: Sat, 07 Apr 2001 17:18:37 -0500

As some of you might remember, I've been trying to get Mac clients to see 
files on my server that have lengths greater than 31 chars.  After taking a 
brief look at the source code, I changed

globals.h: #define MACFILELEN 31
to
globals.h: #define MACFILELEN 120

which successfully makes Netatalk show the longer-named files to the Mac 
clients.  However, it could of course never be that easy, and I now get the 
error

"The document "xxxxxxxxxxxxxxxxxxxxxxxxxxx" could not be opened, because an 
error of type -37 occurred."

whenever I try to read long-named files from a client (OS 9.04 in this 
case).  I assume the problem has something to do with name-length 
translation between the client and the server....somewhere along the line 
the name must be getting truncated, which is why the file cannot be found.

Now, is there any way I can get this setup to work?, or should I just give 
up all hope now :)  The Finder can obviously handle displaying names of 
length greater than 31, but it is not able to read them properly.  I 
(wrongfully) assumed that the Mac client would truncate to 31 chars on its 
own, if it ever saw long-named files.  Is this something that is fixed in 
OS 9.1 ?  Is this something that can be fixed with some more code hacking 
perhaps?

At this point I'm inclined to write a shell script that'll go thru my list 
of long-named files and place short-named symlinks to them in another 
directory....which I would then share with the Mac clients.  It's really 
ugly and a pain-in-the-ass, but it's the best idea I have right now.

Anybody got any ideas ?

aLoN

---

From: Ryan McBeth <[email-masked]>
Date: Mon, 9 Apr 2001 07:17:08 -0400

Alon,

	In all honesty, one of the best ways to fix this problem 
involves no programming at all.
	Use Social engineering.

	Let your employees know, through their employee handbook, or 
their initial training, that you can't make filenames greater than 31 
characters.

	Believe it or not, this approach can work.

	Ryan

>As some of you might remember, I've been trying to get Mac clients 
>to see files on my server that have lengths greater than 31 chars. 
>After taking a brief look at the source code, I changed
>
>which successfully makes Netatalk show the longer-named files to the 
>Mac clients.  However, it could of course never be that easy, and I 
>now get the error
>
>"The document "xxxxxxxxxxxxxxxxxxxxxxxxxxx" could not be opened, 
>because an error of type -37 occurred."
>
>whenever I try to read long-named files from a client (OS 9.04 in 
>this case).  I assume the problem has something to do with 
>name-length translation between the client and the 
>server....somewhere along the line the name must be getting 
>truncated, which is why the file cannot be found.
>
>Now, is there any way I can get this setup to work?, or should I 
>just give up all hope now :)  The Finder can obviously handle 
>displaying names of length greater than 31, but it is not able to 
>read them properly.  I (wrongfully) assumed that the Mac client 
>would truncate to 31 chars on its own, if it ever saw long-named 
>files.  Is this something that is fixed in OS 9.1 ?  Is this 
>something that can be fixed with some more code hacking perhaps?
>
>At this point I'm inclined to write a shell script that'll go thru 
>my list of long-named files and place short-named symlinks to them 
>in another directory....which I would then share with the Mac 
>clients.  It's really ugly and a pain-in-the-ass, but it's the best 
>idea I have right now.
>
>Anybody got any ideas ?
>
>aLoN

__________________________________
Ryan McBeth
Systems Administrator, Mobius New Media
Voice: (302) 475-9880 x11
FAX: (302) 475-9894
www.mobiusnm.com
__________________________________
"The NeXT Computer: The hardware makes it a PC,
the software makes it a workstation, the unit
sales makes it a mainframe."
-Anon.

---

From: Lorenzo Perone <[email-masked]>
Date: Wed, 11 Apr 2001 11:37:35 +0200

At 7:17 Uhr -0400 09.04.2001, Ryan McBeth wrote:
>	Alon,
>
>	In all honesty, one of the best ways to fix this problem involves no programming at all.
>	Use Social engineering.
>
>	Let your employees know, through their employee handbook, or their initial training, that you can't make filenames greater than 31 characters.
>

Did You try this patch on Your customers as well?

;;-)

Lorenzo