From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30667 invoked by alias); 8 Dec 2016 12:35:48 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 30639 invoked by uid 89); 8 Dec 2016 12:35:47 -0000 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 Received: from mail-qt0-f172.google.com (HELO mail-qt0-f172.google.com) (209.85.216.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 08 Dec 2016 12:35:46 +0000 Received: by mail-qt0-f172.google.com with SMTP id w33so409822944qtc.3 for ; Thu, 08 Dec 2016 04:35:46 -0800 (PST) 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 Received: by 10.140.25.171 with HTTP; Thu, 8 Dec 2016 04:35:43 -0800 (PST) In-Reply-To: References: <6e5968a1-a667-f911-fbec-f83e4ef34608@redhat.com> From: Dipak Gaigole Date: Thu, 08 Dec 2016 12:35:00 -0000 Message-ID: Subject: Re: Problem with chdir and GetCurrentDirectory on Windows 2016 To: cygwin@cygwin.com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-12/txt/msg00087.txt.bz2 >>> >>> 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