[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [stem/master] Fixed a bug in stem.util.system.expand_path that may introduce a trailing slash.
commit 03780a98ab131fb5ac6cf1bac192d1d7ec9f238e
Author: Beck <csybeck@xxxxxxxxx>
Date: Wed Jun 20 01:41:37 2012 +0800
Fixed a bug in stem.util.system.expand_path that may introduce a trailing slash.
---
stem/util/system.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/stem/util/system.py b/stem/util/system.py
index fb27b13..3db9cc0 100644
--- a/stem/util/system.py
+++ b/stem/util/system.py
@@ -522,7 +522,10 @@ def expand_path(path, cwd = None):
if path.startswith("./") or path.startswith(".\\"): path = path[2:]
elif path == ".": path = ""
- relative_path = os.path.join(cwd, path)
+ if path == "":
+ relative_path = cwd
+ else:
+ relative_path = os.path.join(cwd, path)
return relative_path
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits