From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 51585 invoked by alias); 1 Dec 2015 11:14:36 -0000 Mailing-List: contact cygwin-apps-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cygwin-apps-cvs-owner@sourceware.org Received: (qmail 50532 invoked by uid 9078); 1 Dec 2015 11:14:35 -0000 Date: Tue, 01 Dec 2015 11:14:00 -0000 Message-ID: <20151201111435.50404.qmail@sourceware.org> From: corinna@sourceware.org To: cygwin-apps-cvs@sourceware.org Subject: [setup] branch master, updated. release_2.873-3-ga9a8e93 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: e0373ab59e0826f4fda87818b238bbbb680c498c X-Git-Newrev: a9a8e93a21763260eeb0b14b0747af86c9056cc2 X-SW-Source: 2015-q4/txt/msg00014.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=cygwin-setup.git;h=a9a8e93a21763260eeb0b14b0747af86c9056cc2 commit a9a8e93a21763260eeb0b14b0747af86c9056cc2 Author: Corinna Vinschen Date: Tue Dec 1 12:14:29 2015 +0100 Make sure Cygwin root is an absolute path * mount.cc (read_mounts): Always convert root dir path from command line to an absolute path. Signed-off-by: Corinna Vinschen Diff: --- ChangeLog | 5 +++++ mount.cc | 14 ++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7236582..c977b9f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-12-01 Corinna Vinschen + + * mount.cc (read_mounts): Always convert root dir path from command line + to an absolute path. + 2015-08-04 Jon Turney * dialog.cc (fatal): Use mbox rather than MessageBox. diff --git a/mount.cc b/mount.cc index 303c138..d4c869b 100644 --- a/mount.cc +++ b/mount.cc @@ -320,10 +320,16 @@ read_mounts (const std::string val) if (val.size ()) { - m->native = val; - m->posix = "/"; - root_here = m; - add_usr_mnts (++m); + /* Cygwin rootdir always < MAX_PATH. */ + char rootdir[MAX_PATH + 1]; + + if (GetFullPathName (val.c_str (), MAX_PATH + 1, rootdir, NULL)) + { + m->native = rootdir; + m->posix = "/"; + root_here = m; + add_usr_mnts (++m); + } } else {