Skip to content

Commit

Permalink
Same as bd528c3 but for directories.
Browse files Browse the repository at this point in the history
  • Loading branch information
harababurel committed Dec 22, 2018
1 parent 800460f commit 11ebeb6
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions src/gcsf/filesystem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ impl Filesystem for GCSF {
if let Err(e) = self.manager.sync() {
debug!("Could not perform sync: {}", e);
}
// println!("current state: {:#?}", self.manager);

let mut curr_offs = offset + 1;
match self.manager.get_children(&FileId::Inode(ino)) {
Expand Down Expand Up @@ -426,19 +427,7 @@ impl Filesystem for GCSF {
}

fn rmdir(&mut self, _req: &Request, parent: Inode, name: &OsStr, reply: ReplyEmpty) {
match self.manager.delete(&FileId::ParentAndName {
parent,
name: name.to_str().unwrap().to_string(),
}) {
Ok(response) => {
debug!("{:?}", response);
reply.ok();
}
Err(e) => {
error!("{:?}", e);
reply.error(EREMOTE);
}
};
self.unlink(_req, parent, name, reply);
}

fn flush(&mut self, _req: &Request, ino: Inode, _fh: u64, _lock_owner: u64, reply: ReplyEmpty) {
Expand Down

0 comments on commit 11ebeb6

Please sign in to comment.