delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/04/06/10:01:56

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
MIME-Version: 1.0
Subject: RE: [ATTN: cvs maintainer] trailing dot issue with cygwin 1.7
Date: Tue, 6 Apr 2010 10:01:14 -0400
Message-ID: <DCBD1FBD71D1A3458CB77C1EB5195274059B26A5@CORPUSMX50C.corp.emc.com>
In-Reply-To: <4BBAA157.40307@cwilson.fastmail.fm>
From: <Seay_Douglas AT emc DOT com>
To: <cygwin AT cwilson DOT fastmail DOT fm>, <cygwin AT cygwin DOT com>
X-EMM-EM: Active
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

If you're going to tack on a character at the end, shorten the length
from 9 to 8.  I believe the goal is to keep the resulting string to 14
characters.  Most likely this is to be compliant with _POSIX_NAME_MAX,
which in limits.h is 14.

- doug

-----Original Message-----
From: cygwin-owner AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com] On Behalf
Of Charles Wilson
Sent: Monday, April 05, 2010 10:50 PM
To: cygwin AT cygwin DOT com
Subject: Re: [ATTN: cvs maintainer] trailing dot issue with cygwin 1.7

On 4/4/2010 11:01 AM, crosmun_william AT emc DOT com wrote:
> The _POSIX_NO_TRUNC variable is defined in cygwin 1.7, and not defined
in cygwin 1.5, so in cygwin 1.7, the code goes down the path where the
temp_filename 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.'  Unfortunately, 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 truncated. The checkout then
fails with 'file not found' errors.=20
>=20
> A simple fix would be to add a valid character after the .9s, eg
>=20
>     sprintf (temp_filename, ".new.%.9s~", filename);=20
>=20
> Can something like this be done and a new package released?

Thanks for the report and suggestion. I'll include a suitable change in
the next release, but it may be a few weeks before I can get to that.

--
Chuck



--
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



--
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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019