delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/12/02/14:14:29

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:cc
:subject:references:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=xj86hGrHHFQHtVFO
XRa9Hjt9FB1SEjAbOnCHHV6/TgJ/bLB8z3wQTZkIjQ+6DvyzDv5RoiXe2RTgTRjd
zfvXcA8MzhJufSL8RviXEXgZIGKztom0v422VZZ+cYKVdbLDOlZ5NLDQOU6Yxxb2
ykPfBPFXEdHOPpjKpxfxQE4Psro=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:cc
:subject:references:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=qIxKUak8B1onDJsHSVlqJ9
icgVY=; b=YqZTm+RqCri+J96oTgfBbSATsNilDtA/HatdOSjgNxg6alVOVcHEX9
gQn0zsADNmCWhMK4XiIlAplJh2lsWGq4DpkfwZuDF7J2ACpIwvasDdRov8+D/yWD
dgTm5Zp5fVkOreDWzAHwP8iBL6ajkolPWtRMsaJcjfSFYEMTbvOpY=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=0.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RDNS_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no version=3.3.2
X-HELO: mail-we0-f178.google.com
X-Received: by 10.180.101.197 with SMTP id fi5mr19672748wib.46.1386011627679; Mon, 02 Dec 2013 11:13:47 -0800 (PST)
Message-ID: <529CDBE8.8000003@gmail.com>
Date: Mon, 02 Dec 2013 19:13:44 +0000
From: Dave Kilroy <kilroyd AT googlemail DOT com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
CC: charles DOT butterfield AT nextcentury DOT com
Subject: Re: chere + mintty doesn't work with mapped drives
References: <00ce27600b2e404cbb8f9e56c3994e8c AT CO2PR07MB556 DOT namprd07 DOT prod DOT outlook DOT com> <e438b5ebbe69401b843342394f5a5ea9 AT CO2PR07MB556 DOT namprd07 DOT prod DOT outlook DOT com> <5299A4BF DOT 8070201 AT gmail DOT com> <e25e9576d2a2415ea90019117708d9d5 AT CO2PR07MB556 DOT namprd07 DOT prod DOT outlook DOT com> <529B529F DOT 7080608 AT googlemail DOT com> <9ce71b17ad604e5c943e3c3731b145d1 AT CO2PR07MB556 DOT namprd07 DOT prod DOT outlook DOT com> <20131201210920 DOT GA11800 AT calimero DOT vinschen DOT de>
In-Reply-To: <20131201210920.GA11800@calimero.vinschen.de>

On 01/12/2013 21:09, Corinna Vinschen wrote:
> On Dec  1 15:48, Charles Butterfield wrote:
>>> -----Original Message-----
>>> From: David Kilroy [mailto:kilroyd AT googlemail DOT com]
>>> Can you run the following commands from mintty running bash vs cmd
>>> running bash:
>>>
>>> cygpath -u "y:\apps"
>>> test -d /cygdrive/y/apps
>>> echo $?
>>>
>>> Result of the first command should be /cygdrive/y/apps 2nd command
>>> shouldn't output anything Result of 3rd command should be 0 (true)
>>>
>>> Dave.
>> Results from MINTTY+BASH:
>> ----------------------------------
>> $ cygpath -u "y:\apps"
>> /cygdrive/y/apps
>>
>> $ test -d /cygdrive/y/apps
>>
>> $ echo $?
>> 1
>>
>> Results from CMD+BASH
>> ------------------------------
>> $ cygpath -u "y:\apps"
>> /cygdrive/y/apps
>>
>> $ test -d /cygdrive/y/apps
>>
>> $ echo $?
>> 0
> Are you starting mintty with "run as administrator" by any chance?
Corrina's right - check that the same user is being used in both cases. 
I don't think this would explain why it's not working from the context 
menus though. Finding out why bash under mintty doesn't think 
/cygdrive/y/apps is a directory is the key.

Workaround: if you change everything in the if [ ! -z "$2" ] test in 
xhere to the snippet below, chere will attempt to change to the 
directory (but may fail)


Regards,

Dave.

if [ ! -z "$2" ]; then
  CHERE_DIR=`$CYGPATH "$2"`
  NETWORK_PATH=/$CHERE_DIR
  if [ -d "$CHERE_DIR" ]; then
   cd "$CHERE_DIR"

  # If the full path doesn't exist, this is prob a network path
  elif [ -d "$NETWORK_PATH" ]; then
   cd "$NETWORK_PATH"

  # Not a directory? Take a guess...
  else
   cd "$CHERE_DIR"

  fi
fi


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