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

Filenames with trailing full-stops or spaces

From: Markus Kuhn <Markus.Kuhn_at_cl.cam.ac.uk>
Date: Wed, 27 Jul 2011 15:02:51 +0100

I have a Subversion repository containing a file with the name "u.."
(yes, it seemed a good idea at the time!).

But when TortoiseSVN checks out (or updates) that repository, it

  a) creates a file with the name "u"
  b) reports that file "u" as being nonversioned
  c) does not create "u.."
  d) reports the file "u.." as being missing

The underlying problem appears to be that the Win32 API strips
trailing space and full-stop characters from filenames passed to it,
unless the UNC syntax is used (e.g. the filename is prefixed with "\\?\").

Suggestion: as this clearly can be used to play silly tricks on
TortoiseSVN users, I think it would be me helpful if a future
TortoiseSVN version would either

  a) issue a warning that it cannot create filenames ending with "." or " "


  b) implement some workaround, such as using UNC paths to get
     these filenames past the API (but other Windows tools.

I'm not sure b) is such a good idea, because other Windows tools will
still have lots of problems with these files (e.g. can't delete them).

I suspect that other filenames that are reserved or invalid in the Win32
name space are also affected, such as "lpt1" or "NUL.txt".

Gory details of illegal Windows filenames:
http://support.microsoft.com/?kbid=320081 (especially causes 5 + 6)


Markus Kuhn, Computer Laboratory, University of Cambridge
http://www.cl.cam.ac.uk/~mgk25/ || CB3 0FD, Great Britain
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-07-27 16:04:26 CEST

This is an archived mail posted to the TortoiseSVN Users mailing list.

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