+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.
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] == ':')
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
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())
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)