Skip to content

Commit

Permalink
修复 fs.stat mod 判断逻辑错误
Browse files Browse the repository at this point in the history
  • Loading branch information
xicilion committed Feb 15, 2017
1 parent 8206d37 commit e56a75c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fibjs/src/fs/Stat.cpp
Expand Up @@ -88,9 +88,9 @@ void Stat::fill(exlib::string path, struct stat64 &st)
atime = (double)st.st_atime * 1000ll;
ctime = (double)st.st_ctime * 1000ll;

m_isReadable = (st.st_mode | S_IRUSR) != 0;
m_isWritable = (st.st_mode | S_IWUSR) != 0;
m_isExecutable = (st.st_mode | S_IXUSR) != 0;
m_isReadable = (S_IRUSR & st.st_mode) != 0;
m_isWritable = (S_IWUSR & st.st_mode) != 0;
m_isExecutable = (S_IXUSR & st.st_mode) != 0;

m_isDirectory = (S_IFDIR & st.st_mode) != 0;
m_isFile = (S_IFREG & st.st_mode) != 0;
Expand Down

0 comments on commit e56a75c

Please sign in to comment.