* path.h (struct fs_info): Drop root_len and name_hash members.
(fsinfo::length): Remove. (path_conv::rootdir): Remove. * syscalls.cc (try_to_bin): Use rootdir function instead of path_conv::rootdir method.
This commit is contained in:
parent
b6c2b7cc73
commit
98144884f8
@ -1,3 +1,11 @@
|
|||||||
|
2007-08-02 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* path.h (struct fs_info): Drop root_len and name_hash members.
|
||||||
|
(fsinfo::length): Remove.
|
||||||
|
(path_conv::rootdir): Remove.
|
||||||
|
* syscalls.cc (try_to_bin): Use rootdir function instead of
|
||||||
|
path_conv::rootdir method.
|
||||||
|
|
||||||
2007-08-02 Corinna Vinschen <corinna@vinschen.de>
|
2007-08-02 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* fhandler_disk_file.cc (path_conv::ndisk_links): Fix typo in call to
|
* fhandler_disk_file.cc (path_conv::ndisk_links): Fix typo in call to
|
||||||
|
@ -93,8 +93,6 @@ class symlink_info;
|
|||||||
struct fs_info
|
struct fs_info
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
int root_len;
|
|
||||||
__ino64_t name_hash;
|
|
||||||
struct status_flags
|
struct status_flags
|
||||||
{
|
{
|
||||||
DWORD flags; /* Volume flags */
|
DWORD flags; /* Volume flags */
|
||||||
@ -112,8 +110,6 @@ struct fs_info
|
|||||||
public:
|
public:
|
||||||
void clear ()
|
void clear ()
|
||||||
{
|
{
|
||||||
name_hash = 0;
|
|
||||||
root_len = 0;
|
|
||||||
flags () = 0;
|
flags () = 0;
|
||||||
is_remote_drive (false);
|
is_remote_drive (false);
|
||||||
has_buggy_open (false);
|
has_buggy_open (false);
|
||||||
@ -127,7 +123,6 @@ struct fs_info
|
|||||||
is_cdrom (false);
|
is_cdrom (false);
|
||||||
}
|
}
|
||||||
inline DWORD& flags () {return status.flags;};
|
inline DWORD& flags () {return status.flags;};
|
||||||
inline int length () const {return root_len;}
|
|
||||||
|
|
||||||
IMPLEMENT_STATUS_FLAG (bool, is_remote_drive)
|
IMPLEMENT_STATUS_FLAG (bool, is_remote_drive)
|
||||||
IMPLEMENT_STATUS_FLAG (bool, has_buggy_open)
|
IMPLEMENT_STATUS_FLAG (bool, has_buggy_open)
|
||||||
@ -158,17 +153,6 @@ class path_conv
|
|||||||
device dev;
|
device dev;
|
||||||
bool case_clash;
|
bool case_clash;
|
||||||
|
|
||||||
int rootdir (char *buf) const
|
|
||||||
{
|
|
||||||
if (!fs.length ())
|
|
||||||
return fs.length ();
|
|
||||||
strncpy (buf, path, fs.length ());
|
|
||||||
/* The length is always stored with trailing backslash. Make sure the
|
|
||||||
backslash is actually present in the returned path. */
|
|
||||||
buf[fs.length () - 1] = '\\';
|
|
||||||
buf[fs.length ()] = '\0';
|
|
||||||
return fs.length ();
|
|
||||||
}
|
|
||||||
bool isremote () const {return fs.is_remote_drive ();}
|
bool isremote () const {return fs.is_remote_drive ();}
|
||||||
bool has_acls () const {return fs.has_acls (); }
|
bool has_acls () const {return fs.has_acls (); }
|
||||||
bool hasgood_inode () const {return fs.hasgood_inode (); }
|
bool hasgood_inode () const {return fs.hasgood_inode (); }
|
||||||
|
@ -146,7 +146,8 @@ try_to_bin (path_conv &win32_path, HANDLE h)
|
|||||||
IO_STATUS_BLOCK io;
|
IO_STATUS_BLOCK io;
|
||||||
char recycler[CYG_MAX_PATH + 20];
|
char recycler[CYG_MAX_PATH + 20];
|
||||||
|
|
||||||
char *c = recycler + win32_path.rootdir (recycler);
|
rootdir (win32_path, recycler);
|
||||||
|
char *c = recycler + strlen (recycler);
|
||||||
if (wincap.has_recycle_dot_bin ())
|
if (wincap.has_recycle_dot_bin ())
|
||||||
{
|
{
|
||||||
strcpy (c, "$Recycle.Bin"); /* NTFS and FAT since Vista */
|
strcpy (c, "$Recycle.Bin"); /* NTFS and FAT since Vista */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user