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 @@ -72,7 +72,8 @@ async def get(self):
7272 # must be expanded.
7373 repo_parent_dir = os .path .join (os .path .expanduser (self .settings ['server_root_dir' ]),
7474 os .getenv ('NBGITPULLER_PARENTPATH' , '' ))
75- repo_dir = os .path .join (repo_parent_dir , self .get_argument ('targetpath' , repo .split ('/' )[- 1 ]))
75+ repo_basename = os .path .splitext (os .path .basename (repo ))[0 ]
76+ repo_dir = os .path .join (repo_parent_dir , self .get_argument ('targetpath' , repo_basename ))
7677
7778 # We gonna send out event streams!
7879 self .set_header ('content-type' , 'text/event-stream' )
@@ -148,8 +149,9 @@ async def get(self):
148149 self .get_argument ('subPath' , '.' )
149150 app = self .get_argument ('app' , app_env )
150151 parent_reldir = os .getenv ('NBGITPULLER_PARENTPATH' , '' )
152+ repo_basename = os .path .splitext (os .path .basename (repo ))[0 ]
151153 targetpath = self .get_argument ('targetpath' , None ) or \
152- self .get_argument ('targetPath' , repo . split ( '/' )[ - 1 ] )
154+ self .get_argument ('targetPath' , repo_basename )
153155
154156 if urlPath :
155157 path = urlPath
You can’t perform that action at this time.
0 commit comments