]> sourceware.org Git - newlib-cygwin.git/commitdiff
* path.cc (fillout_mntent): Append backslash to drive-only paths before
authorCorinna Vinschen <corinna@vinschen.de>
Sun, 19 Aug 2007 15:55:06 +0000 (15:55 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Sun, 19 Aug 2007 15:55:06 +0000 (15:55 +0000)
calling fs_info::update.
* path.h (fs_info::clear): Simplify.
(fs_info::fs_info): Add constructor.

winsup/cygwin/ChangeLog
winsup/cygwin/path.cc
winsup/cygwin/path.h

index 81201218395928d744661ccfdeb7b1abe52e6765..b2dd5c283c4937123567c1aa4a27948ea84602a2 100644 (file)
@@ -1,3 +1,10 @@
+2007-08-19  Corinna Vinschen  <corinna@vinschen.de>
+
+       * path.cc (fillout_mntent): Append backslash to drive-only paths before
+       calling fs_info::update.
+       * path.h (fs_info::clear): Simplify.
+       (fs_info::fs_info): Add constructor.
+
 2007-08-17  Corinna Vinschen  <corinna@vinschen.de>
 
        * spawn.cc (spawn_guts): Fix typo in comment.
index 953efce421f2422bb41da13a6bacdd2d7b27bda8..e3377a0694ed5feb1ec2ee798e4d7d3ab65f062a 100644 (file)
@@ -2596,6 +2596,7 @@ static mntent *
 fillout_mntent (const char *native_path, const char *posix_path, unsigned flags)
 {
   struct mntent& ret=_my_tls.locals.mntbuf;
+  bool append_bs = false;
 
   /* Remove drivenum from list if we see a x: style path */
   if (strlen (native_path) == 2 && native_path[1] == ':')
@@ -2603,6 +2604,7 @@ fillout_mntent (const char *native_path, const char *posix_path, unsigned flags)
       int drivenum = cyg_tolower (native_path[0]) - 'a';
       if (drivenum >= 0 && drivenum <= 31)
        _my_tls.locals.available_drives &= ~(1 << drivenum);
+      append_bs = true;
     }
 
   /* Pass back pointers to mount_table strings reserved for use by
@@ -2625,6 +2627,8 @@ fillout_mntent (const char *native_path, const char *posix_path, unsigned flags)
   size_t size = (strlen (native_path) + 10) * sizeof (WCHAR);
   RtlInitEmptyUnicodeString (&unat, (PWSTR) alloca (size), size);
   get_nt_native_path (native_path, unat);
+  if (append_bs)
+    RtlAppendUnicodeToString (&unat, L"\\");
   mntinfo.update (&unat, true);  /* this pulls from a cache, usually. */
 
   if (mntinfo.is_samba())
index eb3fb5d748d4894dcaec2908559248bff19b679d..fb654d0f987f0e2472f96efddbc2f275dac18a59 100644 (file)
@@ -110,20 +110,9 @@ struct fs_info
     unsigned is_cdrom       : 1;
   } status;
  public:
-  void clear ()
-  {
-    flags () = 0;
-    is_remote_drive (false);
-    has_buggy_open (false);
-    has_acls (false);
-    hasgood_inode (false);
-    is_fat (false);
-    is_ntfs (false);
-    is_samba (false);
-    is_nfs (false);
-    is_netapp (false);
-    is_cdrom (false);
-  }
+  void clear () { memset (this, 0 , sizeof *this); }
+  fs_info () { clear (); }
+
   inline DWORD& flags () {return status.flags;};
 
   IMPLEMENT_STATUS_FLAG (bool, is_remote_drive)
This page took 0.038632 seconds and 5 git commands to generate.