diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2004-07-13 15:36:52 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2004-07-13 15:36:52 +0000 |
commit | 2529ca23efd245afa9fb941626bb6caa5551f3f6 (patch) | |
tree | 12593a61799b2c9e8c8597ed79d43b358459ce35 /lib/fuse.c | |
parent | 73798f95bdc347a159e4656e3e27d8603b778018 (diff) | |
download | libfuse-2529ca23efd245afa9fb941626bb6caa5551f3f6.tar.gz |
add flag to turn off hiding removed but open files
Diffstat (limited to 'lib/fuse.c')
-rw-r--r-- | lib/fuse.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -814,7 +814,7 @@ static void do_unlink(struct fuse *f, struct fuse_in_header *in, char *name) if (path != NULL) { res = -ENOSYS; if (f->op.unlink) { - if (is_open(f, in->ino, name)) + if (!(f->flags & FUSE_HARD_REMOVE) && is_open(f, in->ino, name)) res = hide_node(f, path, in->ino, name); else { res = f->op.unlink(path); @@ -894,7 +894,8 @@ static void do_rename(struct fuse *f, struct fuse_in_header *in, res = -ENOSYS; if (f->op.rename) { res = 0; - if (is_open(f, newdir, newname)) + if (!(f->flags & FUSE_HARD_REMOVE) && + is_open(f, newdir, newname)) res = hide_node(f, newpath, newdir, newname); if (res == 0) { res = f->op.rename(oldpath, newpath); |