Cygwin: fix one more check for positive virtual_ftype_t values
Also drop more comments referring to numerical virtual_ftype_t values.
This commit is contained in:
parent
dec444bee3
commit
ae59d09308
@ -86,9 +86,6 @@ static bool get_mem_values (DWORD dwProcessId, size_t &vmsize, size_t &vmrss,
|
|||||||
size_t &vmtext, size_t &vmdata, size_t &vmlib,
|
size_t &vmtext, size_t &vmdata, size_t &vmlib,
|
||||||
size_t &vmshare);
|
size_t &vmshare);
|
||||||
|
|
||||||
/* Returns 0 if path doesn't exist, >0 if path is a directory,
|
|
||||||
-1 if path is a file, -2 if path is a symlink, -3 if path is a pipe,
|
|
||||||
-4 if path is a socket. */
|
|
||||||
virtual_ftype_t
|
virtual_ftype_t
|
||||||
fhandler_process::exists ()
|
fhandler_process::exists ()
|
||||||
{
|
{
|
||||||
|
@ -306,8 +306,6 @@ multi_wcstombs (char *dst, size_t len, const wchar_t *src, size_t nwc)
|
|||||||
return sum;
|
return sum;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Returns 0 if path doesn't exist, otherwise a virtual_ftype_t value
|
|
||||||
specifying the exact file type. */
|
|
||||||
virtual_ftype_t
|
virtual_ftype_t
|
||||||
fhandler_registry::exists ()
|
fhandler_registry::exists ()
|
||||||
{
|
{
|
||||||
@ -562,7 +560,7 @@ fhandler_registry::fstat (struct stat *buf)
|
|||||||
buf->st_uid = uid;
|
buf->st_uid = uid;
|
||||||
buf->st_gid = gid;
|
buf->st_gid = gid;
|
||||||
buf->st_mode &= ~(S_IWUSR | S_IWGRP | S_IWOTH);
|
buf->st_mode &= ~(S_IWUSR | S_IWGRP | S_IWOTH);
|
||||||
if (file_type > virt_none)
|
if (virt_ftype_isdir (file_type))
|
||||||
buf->st_mode |= S_IFDIR;
|
buf->st_mode |= S_IFDIR;
|
||||||
else
|
else
|
||||||
buf->st_mode &= NO_X;
|
buf->st_mode &= NO_X;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user