File tree 1 file changed +4
-2
lines changed
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):
72
72
# must be expanded.
73
73
repo_parent_dir = os .path .join (os .path .expanduser (self .settings ['server_root_dir' ]),
74
74
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 ))
76
77
77
78
# We gonna send out event streams!
78
79
self .set_header ('content-type' , 'text/event-stream' )
@@ -148,8 +149,9 @@ async def get(self):
148
149
self .get_argument ('subPath' , '.' )
149
150
app = self .get_argument ('app' , app_env )
150
151
parent_reldir = os .getenv ('NBGITPULLER_PARENTPATH' , '' )
152
+ repo_basename = os .path .splitext (os .path .basename (repo ))[0 ]
151
153
targetpath = self .get_argument ('targetpath' , None ) or \
152
- self .get_argument ('targetPath' , repo . split ( '/' )[ - 1 ] )
154
+ self .get_argument ('targetPath' , repo_basename )
153
155
154
156
if urlPath :
155
157
path = urlPath
You can’t perform that action at this time.
0 commit comments