On Tue, Apr 26, 2011 at 2:36 PM, Ken Wesson <kwess...@gmail.com> wrote:
> On Tue, Apr 26, 2011 at 2:26 PM, Dave Ray <dave...@gmail.com> wrote:
>> If the "blah blah blah..." is meant to represent a very long file name
>> or path, my guess would be that you've bumped up against the Windows
>> path limit (260 chars) which can manifest itself in weird ways.
>
> I assume that the file name cannot exceed any system limit, or else it
> could not exist as such in the first place. Obviously the browser was
> able to write the file to that directory with that name, after all;
> the current state of the filesystem resulted from the same operating
> system low level APIs rather than springing fully-formed from the brow
> of Zeus. It would not make sense for those APIs to have one limit for
> writing files and another, lower limit for reading them. Not even by
> the sometimes-peculiar notion of what "makes sense" that they use in
> Redmond.

It's possible to build files a piece at a time using relative paths
that are un-manipulable using standard APIs on Windows, and the key
really is that 260 character limit.

For instance, create a directory with 248 characters at the root of a
drive, and then move that directory to a subdirectory, Windows won't
be able to deal with it anymore.

There is a horribly ugly alternate API to access those files, but not
many applications use it to my knowledge. Try doing: (.renameTo (File.
"\\\\?\\C:\\Users\\blah blah blah") "shorterName")

The magical "\\?\" prefix allows Windows to use files longer than 260
characters.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to