mercurial/store.py
changeset 7514 e54cf540c6ca
parent 7280 810ca383da9c
child 7515 ee5aba886108
--- a/mercurial/store.py	Thu Dec 11 13:33:35 2008 +0000
+++ b/mercurial/store.py	Sat Dec 13 17:39:56 2008 +0100
@@ -111,6 +111,9 @@
         sdirs = []
         for p in parts[:-1]:
             d = p[:DIR_PREFIX_LEN]
+            if d[-1] in '. ':
+                # Windows can't access dirs ending in period or space
+                d = d[:-1] + '_'
             t = '/'.join(sdirs) + '/' + d
             if len(t) > _MAX_SHORTENED_DIRS_LEN:
                 break