delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/12/08/14:42:32

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:mime-version:in-reply-to:references:from:date
:message-id:subject:to:content-type; q=dns; s=default; b=SFm29V2
2F3N3ySRuob2MJfnE+zViIYnSOoS9yIx4q4tZ8+CKwv1OnYU1m1XJ1mb6A7ZAPU1
1Zel5PuIGrT+0VFIzONed0lDi/tHZQs808gpJXvbLHB5ZIOtfhOBYth+19mAwDIx
5PpqKhlqWvV+UO34W3LBv8jTkVmICI1aN9N0=
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:mime-version:in-reply-to:references:from:date
:message-id:subject:to:content-type; s=default; bh=hYJHPkBf60WCM
ooyDk6vxHg1m6A=; b=FT5TEmMgCtLHH2qQ3ly73awmwl2DDNPBb6ujgbbvONTJ6
tUAC5rK6r3SDTnmrvPs0E/eKdDSF3O+/CudC4YFu1YnXpInfd6gonGRXkKUDQLqL
bn6z9qnNHOv5QK/r+F2GBj3nxHGthwxNDV74pfSim55dbH2gh2kpXReAcnPbfg=
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=-2.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=H*f:sk:TeVMnQ5, H*i:sk:TeVMnQ5, our
X-HELO: mail-qt0-f172.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=UdXKCJ+in91TdcW2e7c703tsmcE7KrUdU4svnnnOkNY=; b=MURdsJDIYoQp0uD+BRQK4oJ+gibn5+/LZGkIP89+N1xHuyJKM8yzoieHlg8S/k2Rk6 DtbP/gm2RYUOO11HuoE+aMpYWZIYPNKuSRVc0yJzDAAFg1p4Wel7Bwzw9hw0jsUUObzE MowtdiS9JcPkltYRsiuTiOwlGqrVumSXx5+/+sEo/cQB1Aq58D1+DpsP4ysLIPg6FdZx lyS2ag5vahO40SsAnPNCtFtgJSxjCfYFiGr2Jt90of9Ij4eH96A3IEweVp9uVCVgKLbW /4AmYkal8waL6jhIYxTXIeF+td7zZYDrjZJmLHIr9tkwMvOTFfjk4TOAqisEJ375vWCE GULA==
X-Gm-Message-State: AKaTC01NZRxjEa/g5/erna7lgeWjR7Ul+M+yFxksAdeEKXhcsolDWUKANgyzf2d/Tu0Daz32BmznNLx5B1qgFw==
X-Received: by 10.237.59.6 with SMTP id p6mr70922269qte.217.1481200544401; Thu, 08 Dec 2016 04:35:44 -0800 (PST)
MIME-Version: 1.0
In-Reply-To: <CADs2-=TeVMnQ5sdVGJnSw0ouNh_dj3cBf1PP6fN-62smsBeDpA@mail.gmail.com>
References: <CADs2-=TCsi-vpQxa+Nhwgc6GHo734qpGh+DOYcuYo36C5r4t0g AT mail DOT gmail DOT com> <a26c3edd-8221-12e3-9bc5-c03c7b13bca1 AT redhat DOT com> <CADs2-=QW6AeU9a8_7c557WBfB2VgY6aNQ19E+YK-fd_jnKBMfw AT mail DOT gmail DOT com> <6e5968a1-a667-f911-fbec-f83e4ef34608 AT redhat DOT com> <CADs2-=TeVMnQ5sdVGJnSw0ouNh_dj3cBf1PP6fN-62smsBeDpA AT mail DOT gmail DOT com>
From: Dipak Gaigole <dipakgaigole AT gmail DOT com>
Date: Thu, 8 Dec 2016 18:05:43 +0530
Message-ID: <CADs2-=Sh5cR-LTmxTsVR=jkcGJ0AxhU=ssg436CCJ5DT9WSnSA@mail.gmail.com>
Subject: Re: Problem with chdir and GetCurrentDirectory on Windows 2016
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes

>>>
>>> So in this situation, is it possible to get the cwd value as
>>> "/cygdrive/c/temp/appdir/bin" using some cygwin API?
>>
>> No, it is generally not possible to get the POSIX path to anything in
>> the cygwin root (/) tree to be prefixed by the /cygdrive prefix. The
>> /cygdrive prefix exists solely to resolve paths that are outside of /,
>> so paths inside that tree don't need the /cygdrive prefix.
>>
> This path is also displayed to the enduser at different places. So our
> requirement is to always get a path in the /cygdrive/ prefix format
> irrespective of whether it is inside the cygwin root (/) or outside of
> /.

I think this can be achieved by getcwd () +
cygwin_conv_path(CCP_POSIX_TO_WIN_A,...) and converting the windows
style path to /cygdrive/ prefix format.

Thanks Eric for the pointers :)

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