[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Long path names in windows

From: Stefano Spinucci <virgo977virgo_at_yahoo.it>
Date: 2004-10-28 02:36:58 CEST

Searching in microsoft site, I guess I found some text
confirming the path limit to 260 chars (without
difference from absolute or relative).

From
http://www.microsoft.com/winlogo/software/swglossary.mspx
I read:

long file name: ...Windows XP allows file names that
are up to MAX_FILE characters long....

long path name: ...Windows XP allows paths that are up
to MAX_PATH characters long...

MAX_FILE: ...The current value assigned to MAX_FILE is
255.

MAX_PATH: ...The current value assigned to MAX_PATH is
260.

Furthermore, in
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemiopathclassgetfullpathtopic.asp
(and this apply to the entire .net framework
specification) I found:

PathTooLongException: ...on Windows-based platforms,
paths must be less than 248 characters, and file names
must be less than 260 characters.

---
Stefano Spinucci
Italy
--- Colin JN Breame <colin@breame.com> wrote:
> Julian Foad wrote:
> 
> > Colin JN Breame wrote:
> >
> >> The difference seems to be with long path names. 
> I have read 
> >> somewhere that relative paths have a max length
> of 255 whereas 
> >> absolute paths can be much, much longer.
> >
> >
> > Where does this limit apply?  In the inputs and
> outputs of certain API 
> > functions?  Ones that we use?
> 
> This limit applies on my Windows XP box.  AFAIK,
> this limit is actually 
> in the win32 api, where relative paths are limited
> to 255 but absolute 
> paths are not. e.g. opening a file
> 
> >
> >> So, I suggest that all relative paths are
> converted to their absolute 
> >> versions when running on windows.  Infact, maybe
> there is a function 
> >> in the apr that can be used.  Anyone know about
> this?
> >
> >
> > It is hard to evaluate this solution because it is
> not clear what 
> > problem you are trying to solve - presumably some
> problem with paths 
> > being too long, but what exactly?  Is this an
> actual problem that can 
> > be demonstrated?  Please show us how.
> 
> I have a Real Life(tm) repository that has very long
> path names.
> 
> To demostrate, in Windows:
> 1) create a directory structure that is very deep.
> e.g. more than 255 
> characters.  One way of doing this is using cygwin
> (while true; do mkdir 
> test; cd test; done).  As cygwin suffers from the
> same problem, it will 
> stop when the 255 char limit is exceeded.
> 
> 2) Create a file (echo "hello" > afile) in the
> deepest directory.
> 
> 3) Then import into a repository.
> 
> 4) Check out the repository into a new directory
> called 'path'.  Notice 
> the difference between the two checkouts:
> 
>      a) svn co svn://repos c:\path
> and
> (from the parent directory of path)
>      b) svn co svn://repos path
> 
> (a) should succeed and (b) should fail, assuming
> that the instructions 
> are correct.
> 
> >
> > - Julian
> >
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail:
> dev-help@subversion.tigris.org
> 
> 
	
		
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Oct 28 02:37:19 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.