Mercurial > cgi-bin > hgweb.cgi > tincan
diff install-static @ 51:caed7c5e8318 draft
Another bug fix.
author | David Barts <n5jrn@me.com> |
---|---|
date | Thu, 30 May 2019 22:02:02 -0700 |
parents | ccd52fb45cff |
children | 243603aaab7e |
line wrap: on
line diff
--- a/install-static Thu May 30 21:55:26 2019 -0700 +++ b/install-static Thu May 30 22:02:02 2019 -0700 @@ -25,7 +25,6 @@ sys.exit(2) def copydir(source, target, exclude=True): - global args for entry in os.listdir(source): if exclude and entry == WINF: continue @@ -50,11 +49,12 @@ print("cp", repr(spath), repr(tpath)) copyfile(spath, tpath) elif S_ISDIR(stype): - if ttype is not None and not S_ISDIR(ttype): - sys.stderr.write( - "{0}: {1!r} not a directory\n".format(MYNAME, tpath)) - sys.exit(1) - if not S_ISDIR(ttype): + if ttype is not None: + if not S_ISDIR(ttype): + sys.stderr.write( + "{0}: {1!r} not a directory\n".format(MYNAME, tpath)) + sys.exit(1) + else: print("mkdir", repr(tpath)) os.mkdir(tpath) copydir(spath, tpath, False)