mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
fix broken implementation of join()
This commit is contained in:
parent
55387212b7
commit
8062339604
@ -322,8 +322,19 @@ def walk(top, topdown = True, onerror = None, followlinks = True):
|
|||||||
if not topdown:
|
if not topdown:
|
||||||
yield (top, dirnames, filenames)
|
yield (top, dirnames, filenames)
|
||||||
|
|
||||||
def join(a, b):
|
def join(path, *args):
|
||||||
return '%s/%s' % (a, b)
|
for part in args:
|
||||||
|
if part == '':
|
||||||
|
continue
|
||||||
|
|
||||||
|
if part.startswith('/'):
|
||||||
|
path = part
|
||||||
|
elif path.endswith('/'):
|
||||||
|
path = path + part
|
||||||
|
else:
|
||||||
|
path = '/'.join((path, part))
|
||||||
|
|
||||||
|
return path
|
||||||
|
|
||||||
def isfile(path):
|
def isfile(path):
|
||||||
return _vfs.isRegularFile(pm.Filename.fromOsSpecific(path))
|
return _vfs.isRegularFile(pm.Filename.fromOsSpecific(path))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user