* Bug fix: properly check result of open().
This commit is contained in:
parent
82e3d8fafe
commit
bfa5d77211
1 changed files with 1 additions and 1 deletions
|
@ -87,7 +87,7 @@ static void dumpContents(const string & path, unsigned int size,
|
||||||
writeInt(size, sink);
|
writeInt(size, sink);
|
||||||
|
|
||||||
int fd = open(path.c_str(), O_RDONLY);
|
int fd = open(path.c_str(), O_RDONLY);
|
||||||
if (!fd) throw SysError("opening file " + path);
|
if (fd == -1) throw SysError("opening file " + path);
|
||||||
|
|
||||||
unsigned char buf[65536];
|
unsigned char buf[65536];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue