From 4a7a42b5e1fdb2911b86b919a373c835e738ff37 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Wed, 15 Jun 2011 14:24:43 -0700 Subject: [PATCH] uclient: path_walk should notice when it gets absolute paths. Previously it assumed everything was relative, but we need to handle absolute paths on occasion, and already have the code to do so! Signed-off-by: Greg Farnum --- src/client/Client.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index ecc41f33bb04c..b521d4eecc9fb 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -3382,7 +3382,11 @@ int Client::get_or_create(Inode *dir, const char* name, int Client::path_walk(const filepath& origpath, Inode **final, bool followsym) { filepath path = origpath; - Inode *cur = cwd; + Inode *cur; + if (origpath.absolute()) + cur = root; + else + cur = cwd; assert(cur); dout(10) << "path_walk " << path << dendl; -- 2.39.5