summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects.py
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2017-10-12 07:59:11 +0200
committerGauvain Pocentek <gauvain@pocentek.net>2017-10-12 07:59:11 +0200
commit9d0a47987a316f9eb1bbb65c587d6fa75e4c6409 (patch)
tree3347f4a1dc26b4ed0d998a47627b8e552e53a244 /gitlab/v4/objects.py
parentd6fa94ef38c638206d1d18bbd6ddf3f56057b1ce (diff)
downloadgitlab-9d0a47987a316f9eb1bbb65c587d6fa75e4c6409.tar.gz
ProjectFileManager.create: handle / in file paths
Replace / with %2F as is done in other methods. Fixes #339
Diffstat (limited to 'gitlab/v4/objects.py')
-rw-r--r--gitlab/v4/objects.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py
index e43d65e..941e17d 100644
--- a/gitlab/v4/objects.py
+++ b/gitlab/v4/objects.py
@@ -1430,7 +1430,7 @@ class ProjectFileManager(GetMixin, CreateMixin, UpdateMixin, DeleteMixin,
"""
self._check_missing_create_attrs(data)
- file_path = data.pop('file_path')
+ file_path = data.pop('file_path').replace('/', '%2F')
path = '%s/%s' % (self.path, file_path)
server_data = self.gitlab.http_post(path, post_data=data, **kwargs)
return self._obj_cls(self, server_data)