File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,8 @@ async def get(self):
7878 # must be expanded.
7979 repo_parent_dir = os .path .join (os .path .expanduser (self .settings ['server_root_dir' ]),
8080 os .getenv ('NBGITPULLER_PARENTPATH' , '' ))
81- repo_dir = os .path .join (repo_parent_dir , self .get_argument ('targetpath' , repo .split ('/' )[- 1 ]))
81+ repo_basename = os .path .splitext (os .path .basename (repo ))[0 ]
82+ repo_dir = os .path .join (repo_parent_dir , self .get_argument ('targetpath' , repo_basename ))
8283
8384 # We gonna send out event streams!
8485 self .set_header ('content-type' , 'text/event-stream' )
@@ -154,8 +155,9 @@ async def get(self):
154155 self .get_argument ('subPath' , '.' )
155156 app = self .get_argument ('app' , app_env )
156157 parent_reldir = os .getenv ('NBGITPULLER_PARENTPATH' , '' )
158+ repo_basename = os .path .splitext (os .path .basename (repo ))[0 ]
157159 targetpath = self .get_argument ('targetpath' , None ) or \
158- self .get_argument ('targetPath' , repo . split ( '/' )[ - 1 ] )
160+ self .get_argument ('targetPath' , repo_basename )
159161
160162 if urlPath :
161163 path = urlPath
You can’t perform that action at this time.
0 commit comments