Mail Archives: cygwin/2010/04/04/11:02:26
I haven't seen this reported in the mailing lists anywhere. My apologies if=
it has. =A0We are having problems with the cvs client running in Cygwin 1.=
7. There is a section of code in src/client.c
>=A0=A0=A0=A0=A0temp_filename =3D xmalloc (strlen (filename) + 80);
> #ifdef USE_VMS_FILENAMES
>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0/* A VMS rename of "blah.dat" to "foo" to im=
plies a
>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0destination of "foo.dat" which is u=
nfortinate for CVS */
>=A0=A0=A0=A0=A0sprintf (temp_filename, "%s_new_", filename);
> #else
> #ifdef _POSIX_NO_TRUNC
>=A0=A0=A0=A0=A0sprintf (temp_filename, ".new.%.9s", filename); =A0<----- H=
ere's the problem
> #else /* _POSIX_NO_TRUNC */
>=A0=A0=A0=A0=A0sprintf (temp_filename, ".new.%s", filename);
> #endif /* _POSIX_NO_TRUNC */
> #endif /* USE_VMS_FILENAMES */
The _POSIX_NO_TRUNC variable is defined in cygwin 1.7, and not defined in c=
ygwin 1.5, so in cygwin 1.7, the code goes down the path where the temp_fil=
ename is the first 9 characters of the original filename preceded by '.new.=
' The problem occurs when the 9th character in the filename is a dot. Eg, '=
abcdefgh.txt'. The temp_filename becomes '.new.abcdefgh.' =A0Unfortunately,=
when checking out to a Samba share, or other network shares that try to be=
CIFS compatible, a trailing . is invalid in a filename. The temporary file=
either doesn't get created, or gets created but with the trailing dot trun=
cated. The checkout then fails with 'file not found' errors.=A0
A simple fix would be to add a valid character after the .9s, eg
sprintf (temp_filename, ".new.%.9s~", filename);=A0
Can something like this be done and a new package released?
William=A0Crosmun=A0
BIRT
Email:=A0=A0crosmun_william AT emc DOT com
___________________________________________=20
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -