From: Michael Vrable Date: Fri, 10 Aug 2007 02:20:30 +0000 (-0700) Subject: Fix a double-close of a file descriptor. X-Git-Url: https://git.vrable.net/?a=commitdiff_plain;h=bf8eba693e2667688b83b2a4aa220ec8adcb7907;p=cumulus.git 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()). --- 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