File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -78,19 +78,18 @@ def join(a, *p):
7878 path = a
7979 try :
8080 if not p :
81- # bpo-23780: Ensure compatible data type even if paths is empty.
82- a [:0 ] + sep
81+ path [:0 ] + sep #23780: Ensure compatible data type even if p is null.
8382 for b in map (os .fspath , p ):
8483 if b .startswith (sep ):
85- a = b
86- elif not a or a .endswith (sep ):
87- a += b
84+ path = b
85+ elif not path or path .endswith (sep ):
86+ path += b
8887 else :
89- a += sep + b
88+ path += sep + b
9089 except (TypeError , AttributeError , BytesWarning ):
91- genericpath ._check_arg_types ('join' , path , * p )
90+ genericpath ._check_arg_types ('join' , a , * p )
9291 raise
93- return a
92+ return path
9493
9594
9695# Split a path in head (everything up to the last '/') and tail (the
You can’t perform that action at this time.
0 commit comments