projects
/
cumulus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
98d72e3
)
Fix a double-close of a file descriptor.
author
Michael Vrable
<mvrable@cs.ucsd.edu>
Fri, 10 Aug 2007 02:20:30 +0000
(19:20 -0700)
committer
Michael Vrable
<mvrable@turin.ucsd.edu>
Fri, 10 Aug 2007 02:20:30 +0000
(19:20 -0700)
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
patch
|
blob
|
history
diff --git
a/scandir.cc
b/scandir.cc
index
d35c552
..
1db5ec3
100644
(file)
--- 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