public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
* [setup] branch master, updated. release_2.873-3-ga9a8e93
@ 2015-12-01 11:14 corinna
  0 siblings, 0 replies; only message in thread
From: corinna @ 2015-12-01 11:14 UTC (permalink / raw)
  To: cygwin-apps-cvs




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
     {


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-12-01 11:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-01 11:14 [setup] branch master, updated. release_2.873-3-ga9a8e93 corinna

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