about summary refs log tree commit diff
path: root/src/archive.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/archive.cc')
-rw-r--r--src/archive.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/archive.cc b/src/archive.cc
index d0cf6ca34a7b..7e07b8a08b49 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];