Cygwin: change virtual_ftype_t to not rely on negative values
So far negative values were denoting files, positive values denoting directories. We should prefer a less error prone method. Redefine virtual_ftype_t to contain only positive values and replace checks for negativ or positive values with inline functions virt_ftype_isfile() and virt_ftype_isdir(). Drop outdcated comments referring to numerical virtual_ftype_t values. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
@ -169,7 +169,7 @@ fhandler_process::fstat (struct stat *buf)
|
||||
buf->st_uid = p->uid;
|
||||
buf->st_gid = p->gid;
|
||||
buf->st_mode |= S_IFDIR | S_IXUSR | S_IXGRP | S_IXOTH;
|
||||
if (file_type == 1)
|
||||
if (file_type == virt_directory)
|
||||
buf->st_nlink = 2;
|
||||
else
|
||||
buf->st_nlink = 3;
|
||||
|
Reference in New Issue
Block a user