Permalink
Browse files

don't try to flush O_RDONLY files

  • Loading branch information...
1 parent 789e9b9 commit 3346e2d0cceeb3a572bce3decc9046687a2a1759 @mikejs committed Sep 28, 2009
Showing with 4 additions and 0 deletions.
  1. +4 −0 operations.cpp
View
@@ -337,6 +337,10 @@ int gridfs_flush(const char* path, struct fuse_file_info *ffi)
string db_name = gridfs_options.db;
+ if(!ffi->fh) {
+ return 0;
+ }
+
map<string,LocalGridFile*>::iterator file_iter;
file_iter = open_files.find(path);
if(file_iter == open_files.end()) {

0 comments on commit 3346e2d

Please sign in to comment.