Apparently broken bitmask checks

Change-Id: Ie5749b43de5e47cfede4662e346dee194c454b2f
This commit is contained in:
Stephan Bergmann
2014-01-27 08:29:26 +01:00
parent 3a5ad6fd36
commit 62e67d1a0a

View File

@@ -105,11 +105,11 @@ namespace ftp {
}
bool isDir() const {
return bool(m_nMode && INETCOREFTP_FILEMODE_ISDIR);
return (m_nMode & INETCOREFTP_FILEMODE_ISDIR) != 0;
}
bool isFile() const {
return ! bool(m_nMode && INETCOREFTP_FILEMODE_ISDIR);
return (m_nMode & INETCOREFTP_FILEMODE_ISDIR) == 0;
}
};