Renamed path.cat to path.join.
This commit is contained in:
parent
c3f2a3bf93
commit
9c5c80824c
|
@ -14,7 +14,7 @@ def visit(pattern, dirname, names):
|
||||||
print 'descend into', dirname
|
print 'descend into', dirname
|
||||||
n = len(pattern)
|
n = len(pattern)
|
||||||
for name in names:
|
for name in names:
|
||||||
name = path.cat(dirname, name)
|
name = path.join(dirname, name)
|
||||||
try:
|
try:
|
||||||
linkto = posix.readlink(name)
|
linkto = posix.readlink(name)
|
||||||
if linkto[:n] = pattern:
|
if linkto[:n] = pattern:
|
||||||
|
|
|
@ -9,7 +9,7 @@ import posix
|
||||||
import path
|
import path
|
||||||
from stat import *
|
from stat import *
|
||||||
|
|
||||||
cat = path.cat
|
join = path.join
|
||||||
|
|
||||||
error = 'mkreal error'
|
error = 'mkreal error'
|
||||||
|
|
||||||
|
@ -37,11 +37,11 @@ def mkrealdir(name):
|
||||||
posix.unlink(name)
|
posix.unlink(name)
|
||||||
posix.mkdir(name, mode)
|
posix.mkdir(name, mode)
|
||||||
posix.chmod(name, mode)
|
posix.chmod(name, mode)
|
||||||
linkto = cat('..', linkto)
|
linkto = join('..', linkto)
|
||||||
#
|
#
|
||||||
for file in files:
|
for file in files:
|
||||||
if file not in ('.', '..'):
|
if file not in ('.', '..'):
|
||||||
posix.symlink(cat(linkto, file), cat(name, file))
|
posix.symlink(join(linkto, file), join(name, file))
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
sys.stdout = sys.stderr
|
sys.stdout = sys.stderr
|
||||||
|
|
|
@ -16,7 +16,7 @@ sts = 0
|
||||||
for prog in sys.argv[1:]:
|
for prog in sys.argv[1:]:
|
||||||
ident = ()
|
ident = ()
|
||||||
for dir in pathlist:
|
for dir in pathlist:
|
||||||
file = path.cat(dir, prog)
|
file = path.join(dir, prog)
|
||||||
try:
|
try:
|
||||||
st = posix.stat(file)
|
st = posix.stat(file)
|
||||||
if S_ISREG(st[ST_MODE]):
|
if S_ISREG(st[ST_MODE]):
|
||||||
|
|
Loading…
Reference in New Issue