mercurial/pathencode.c
branchstable
changeset 19317 66da6e9feacd
parent 19185 8bed40e02c3b
child 20535 5f683209f5b6
equal deleted inserted replaced
19316:6f3428c528b4 19317:66da6e9feacd
   583 			char d = dest[destlen - 1];
   583 			char d = dest[destlen - 1];
   584 			/* After truncation, a directory name may end
   584 			/* After truncation, a directory name may end
   585 			   in a space or dot, which are unportable. */
   585 			   in a space or dot, which are unportable. */
   586 			if (d == '.' || d == ' ')
   586 			if (d == '.' || d == ' ')
   587 				dest[destlen - 1] = '_';
   587 				dest[destlen - 1] = '_';
   588 			if (destlen > maxshortdirslen)
   588 			/* The + 3 is to account for "dh/" in the beginning */
       
   589 			if (destlen > maxshortdirslen + 3)
   589 				break;
   590 				break;
   590 			charcopy(dest, &destlen, destsize, src[i]);
   591 			charcopy(dest, &destlen, destsize, src[i]);
   591 			p = -1;
   592 			p = -1;
   592 		}
   593 		}
   593 		else if (p < dirprefixlen)
   594 		else if (p < dirprefixlen)