diff options
Diffstat (limited to 'lib/System')
-rw-r--r-- | lib/System/Unix/Path.inc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/System/Unix/Path.inc b/lib/System/Unix/Path.inc index 74596dc..185f7fd 100644 --- a/lib/System/Unix/Path.inc +++ b/lib/System/Unix/Path.inc @@ -421,10 +421,8 @@ bool Path::getMagicNumber(std::string &Magic, unsigned len) const { return false; ssize_t bytes_read = ::read(fd, Buf, len); ::close(fd); - if (ssize_t(len) != bytes_read) { - Magic.clear(); + if (ssize_t(len) != bytes_read) return false; - } Magic.assign(Buf, len); return true; } |