diff mbox

[1/2] Add analogous special case for "." directory alongside ".." in _lookup

Message ID 1305178007-2927-2-git-send-email-brchrisman@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Brian Chrisman May 12, 2011, 5:26 a.m. UTC
Signed-off-by: Brian Chrisman <brchrisman@gmail.com>
---
 src/client/Client.cc |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/src/client/Client.cc b/src/client/Client.cc
index 10a6829..6ab4643 100644
--- a/src/client/Client.cc
+++ b/src/client/Client.cc
@@ -3267,6 +3267,11 @@  int Client::_lookup(Inode *dir, const string& dname, Inode **target)
     goto done;
   }
 
+  if (dname == ".") {
+    *target = dir;
+    goto done;
+  }
+
   if (dname.length() > NAME_MAX) {
     r = -ENAMETOOLONG;
     goto done;