X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: [ATTN: cvs maintainer] trailing dot issue with cygwin 1.7 Date: Sun, 4 Apr 2010 11:01:34 -0400 Message-ID: <90BCBCF398FF14448502FD294B6EBA7C038CD390@CORPUSMX100A.corp.emc.com> From: To: X-EMM-EM: Active Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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