From bf8eba693e2667688b83b2a4aa220ec8adcb7907 Mon Sep 17 00:00:00 2001 From: Michael Vrable Date: Thu, 9 Aug 2007 19:20:30 -0700 Subject: [PATCH] Fix a double-close of a file descriptor. When a file is dumped, the file descriptor is opened by scanfile(), so that is the function which should close it (not dump_inode()). --- scandir.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/scandir.cc b/scandir.cc index d35c552..1db5ec3 100644 --- a/scandir.cc +++ b/scandir.cc @@ -351,7 +351,6 @@ void dump_inode(const string& path, // Path within snapshot file_size = dumpfile(fd, file_info, path, stat_buf); file_info["size"] = encode_int(file_size); - close(fd); if (file_size < 0) return; // error occurred; do not dump file -- 2.20.1