public inbox for cygwin-apps-cvs@sourceware.org help / color / mirror / Atom feed
From: corinna@sourceware.org To: cygwin-apps-cvs@sourceware.org Subject: [setup] branch master, updated. release_2.873-3-ga9a8e93 Date: Tue, 01 Dec 2015 11:14:00 -0000 [thread overview] Message-ID: <20151201111435.50404.qmail@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=cygwin-setup.git;h=a9a8e93a21763260eeb0b14b0747af86c9056cc2 commit a9a8e93a21763260eeb0b14b0747af86c9056cc2 Author: Corinna Vinschen <corinna@vinschen.de> 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 <corinna@vinschen.de> 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 <corinna@vinschen.de> + + * mount.cc (read_mounts): Always convert root dir path from command line + to an absolute path. + 2015-08-04 Jon Turney <jon.turney@dronecode.org.uk> * 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 {
reply other threads:[~2015-12-01 11:14 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20151201111435.50404.qmail@sourceware.org \ --to=corinna@sourceware.org \ --cc=cygwin-apps-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).