X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 	tests=AWL,BAYES_00,MISSING_HEADERS,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: sourceware.org
Date: Tue, 24 Feb 2009 15:27:03 -0600 (CST)
From: Tim McDaniel <tmcd@panix.com>
cc: Cygwin mailing list <cygwin@cygwin.com>
Subject: Re: file name too long
In-Reply-To: <37bd06460902241224p2b44d828id6e15d4c4cc453b8@mail.gmail.com>
Message-ID: <Pine.NEB.4.64.0902241516140.720@panix3.panix.com>
References: <37bd06460902141000s4c1adfa8gb7c0ab135be210f9@mail.gmail.com>  <37bd06460902241224p2b44d828id6e15d4c4cc453b8@mail.gmail.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Tue, 24 Feb 2009, Paul Cantalupo <hey, I remembers to expunge
this!> wrote:
> tar: S1172_Spanish_Protin_Total_Nucleic_Acid/S1172_Spanish_Protin_Total_Nucleic_Acid.fa.cdhit_out.masked.goodSeq_HGblast/S1172_Spanish_Protin_Total_Nucleic_Acid.fa.cdhit_out.masked.goodSeq_file7.HGblast.out:
> Cannot open: File name too long
>
> This name is only 201 chars long; I thought Windows max file length
> was 255.

I have a vague memory that the limit includes the current directory
path.  Anyone else know whether that's true or not?

What's the current directory name when running that?  If you add the
length of the current directory name, plus one for the "/" separator,
plus the length of the path above, is it more than 254?

> Is there a workaround to this problem other than installing Linux?

When the problem can be helped with a shorter directory name, I use
the subst Windows command to map the directory to a drive letter.
That shortens the directory name from whatever to 2.  For example, M:
is one letter that I leave unused, and /mnt is my value instead of
/cygdrive.  So, as an untested example from Windows Server 2003:

     /mnt/c/WINDOWS/system32/subst M: 'c:\long\path name\goes  here'
     pushd /mnt/m
     [do my work here]
     popd
     /mnt/c/WINDOWS/system32/subst M: /d    # unmap the drive letter

-- 
Tim McDaniel, tmcd@panix.com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

