Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Too long file paths. Should I really care?



This is why we don't feel too terrible about using fopen/open to access files--that's how most of the OS accesses files too. :) It's very interesting to see the list spelled out, though. I knew "there are lots of problems" but it's a bit shocking to see them spelled out like this!

If Apple updates their Posix implementation to support arbitrary-length paths, we'll all benefit. Until then, those ultra-long paths are both exceedingly rare  and very problematic in practice. 


On Sep 13, 2005, at 8:32 AM, Matt Gough wrote:

Whilst testing my app's ability to cope with documents that cause CFURLCreateFromFSRef to fail due to path length restrictions I thought I'd see how other stuff in the system copes with such files.

In short, the answer is appallingly, so I am thinking that maybe I really shouldn't care. From my own testing it seems that no-one would actually be able to work with such a document anyway. (FYI - my app doesn't create or edit any documents, it just works with them in other ways.)

E.g.

Finder
Once you drag something into a folder that makes its path too long, you can no longer drag it out again.

You can't use Open With as that calls down to LSCopyApplicationURLsForURL and the URL is duff. (Why no LSCopyApplicationURLsForRef ?)


Cocoa apps
You cannot open any such document or save a document to such a place. No user feedback apart from dimmed Open/Save buttons in Open/Save dialogs. Double-clicking them in the Finder does nothing.


Carbon apps
You can double-click them to open them, but attempting to use Nav Services to open or save them will crash the app whilst trying to update the Recent Documents:

0   com.apple.CoreFoundation           0x90737b9c CFURLGetString + 52
1   com.apple.NavigationServices       0x930770a0 TBrowseDialog::SaveDialogPrefs() + 876
2   com.apple.NavigationServices       0x93076b28 TBrowseDialog::TerminateDialog() + 88
3   com.apple.NavigationServices       0x93076a90 _NavDialog::TerminateWithUserAction(unsigned long) + 72


Spotlight
Never finds such a file.


Classic apps
No problems at all :)


So given that I haven't heard of hoards of users storming Infinite Loop with pitch forks and burning sticks complaining about these problems I really do think that it is a moot point.

Any comments?

Matt Gough
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden

References: 
 >Too long file paths. Should I really care? (From: Matt Gough <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.