8000 ProjectFileManager.create: handle / in file paths · python-gitlab/python-gitlab@9d0a479 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9d0a479

Browse files
author
Gauvain Pocentek
committed
ProjectFileManager.create: handle / in file paths
Replace / with %2F as is done in other methods. Fixes #339
1 parent d6fa94e commit 9d0a479

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gitlab/v4/objects.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1430,7 +1430,7 @@ def create(self, data, **kwargs):
14301430
"""
14311431

14321432
self._check_missing_create_attrs(data)
1433-
file_path = data.pop('file_path')
1433+
file_path = data.pop('file_path').replace('/', '%2F')
14341434
path = '%s/%s' % (self.path, file_path)
14351435
server_data = self.gitlab.http_post(path, post_data=data, **kwargs)
14361436
return self._obj_cls(self, server_data)

0 commit comments

Comments
 (0)
0