From 750a2c1f9dbf5ce43e181b8d9d8c8a372a6901e6 Mon Sep 17 00:00:00 2001
From: Jeremy Soller <jackpot51@gmail.com>
Date: Thu, 22 Sep 2016 21:27:33 -0600
Subject: [PATCH] Fix path lookup

---
 context/context.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/context/context.rs b/context/context.rs
index c06e7784..9dcc10be 100644
--- a/context/context.rs
+++ b/context/context.rs
@@ -69,7 +69,7 @@ impl Context {
                 cwd.clone()
             } else if path == b".." {
                 cwd[..cwd[..cwd.len() - 1]
-                                   .iter().rposition(|&b| b == b'/')
+                                   .iter().rposition(|&b| b == b'/' || b == b':')
                                    .map_or(cwd.len(), |i| i + 1)]
                    .to_vec()
             } else if path.starts_with(b"./") {
@@ -78,7 +78,7 @@ impl Context {
                 canon
             } else if path.starts_with(b"../") {
                 let mut canon = cwd[..cwd[..cwd.len() - 1]
-                                   .iter().rposition(|&b| b == b'/')
+                                   .iter().rposition(|&b| b == b'/' || b == b':')
                                    .map_or(cwd.len(), |i| i + 1)]
                    .to_vec();
                 canon.extend_from_slice(&path[3..]);
-- 
GitLab