File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ def print_usage(exit_code=1):
30
30
if len (sys .argv ) not in [3 , 4 ]:
31
31
print_usage ()
32
32
33
- testDir = sys .argv [1 ]. rstrip ( "/" )
34
- stubDir = sys .argv [2 ]. rstrip ( "/" )
33
+ testDir = os . path . normpath ( sys .argv [1 ])
34
+ stubDir = os . path . normpath ( sys .argv [2 ])
35
35
36
36
def check_dir_exists (path ):
37
37
if not os .path .isdir (path ):
@@ -155,7 +155,7 @@ def run(cmd):
155
155
f"WARNING: Multiple stubs generated for { typ } . This is probably a bug. One will be chosen arbitrarily." )
156
156
157
157
for (typ , stub ) in results ['#select' ]['tuples' ]:
158
- stubFile = os .path .join (stubDir , typ .replace ("." , "/" ) + ".java" )
158
+ stubFile = os .path .join (stubDir , * typ .split ("." )) + ".java"
159
159
os .makedirs (os .path .dirname (stubFile ), exist_ok = True )
160
160
with open (stubFile , "w" ) as f :
161
161
f .write (stub )
You can’t perform that action at this time.
0 commit comments