Bug 457113: source files altered when building with symlinked chrome; r=pike

This commit is contained in:
Karsten Düsterloh 2008-09-28 21:42:38 +02:00
Родитель d326d65b0d
Коммит 4dfc73d1b9
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -380,6 +380,12 @@ class JarMaker(object):
return getModTime(os.path.join(self.basepath, aPath))
def getOutput(self, name):
out = self.ensureDirFor(name)
# remove previous link or file
try:
os.remove(out)
except OSError, e:
if e.errno != 2:
raise
return open(out, 'wb')
def ensureDirFor(self, name):
out = os.path.join(self.basepath, name)