aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-07-06 15:08:39 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-07-06 15:08:39 +0000
commitbfa5d77211385cd8abe5d0833f84a8151ccab37d (patch)
tree1af293d7a7d255d5c3ddf8d3969997623af07c06 /src
parent82e3d8fafe0ac08589349094e3ea11022d995959 (diff)
* Bug fix: properly check result of open().
Diffstat (limited to 'src')
-rw-r--r--src/archive.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/archive.cc b/src/archive.cc
index d0cf6ca34..7e07b8a08 100644
--- a/src/archive.cc
+++ b/src/archive.cc
@@ -87,7 +87,7 @@ static void dumpContents(const string & path, unsigned int size,
writeInt(size, sink);
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];