Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
for dirpath, dirnames, filenames in os.walk(self.webContent):
dirnames[:] = list(filter(notDotfile, dirnames)) # Note that we're modifying dirnames in place
if "WEB-INF" in dirnames:
dirnames.remove("WEB-INF")
for filename in filter(notDotfile, filenames):
path = os.path.normpath(os.path.join(dirpath, filename))
pathRelToWebContent = relpath(path, self.webContent)
name = join(tmt.WinstoneServer.binResource, "webapps", "ROOT", pathRelToWebContent)
linkParent = os.path.dirname(name)
if not os.path.exists(linkParent):
os.makedirs(linkParent)
else:
assert os.path.isdir(linkParent)
tmt.createSymlinkIfNotExistsOrStale(relpath(path, linkParent), name)
tmt.WinstoneServer.mungeXmlFiles(topLevelWebProject=self)
return newCompile