summaryrefslogtreecommitdiff
path: root/fastimport/commands.py
diff options
context:
space:
mode:
Diffstat (limited to 'fastimport/commands.py')
-rw-r--r--fastimport/commands.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/fastimport/commands.py b/fastimport/commands.py
index fe2379b..f3b9541 100644
--- a/fastimport/commands.py
+++ b/fastimport/commands.py
@@ -384,8 +384,10 @@ def check_path(path):
:return: the path if all is OK
:raise ValueError: if the path is illegal
"""
- if path is None or path == '':
+ if path is None or path == '' or path[0] == "/":
raise ValueError("illegal path '%s'" % path)
+ if type(path) != str:
+ raise TypeError("illegale type for path '%r'" % path)
return path