author | Gregory Szorc <gps@mozilla.com> |
Fri, 04 Oct 2013 15:00:39 +0200 | |
changeset 149907 | 74c262c73ebbc65a38785d17734bd4fff36816ba |
parent 149906 | 23b80710852432518d6bcc29ccafab7247a3fd19 |
child 149908 | b222d20212b3319bb2daa915b44c9c72a35235e3 |
push id | 25405 |
push user | philringnalda@gmail.com |
push date | Sat, 05 Oct 2013 05:04:31 +0000 |
treeherder | mozilla-central@bd7bb523c5dc [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | glandium |
bugs | 920637 |
milestone | 27.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/python/mozbuild/mozpack/copier.py +++ b/python/mozbuild/mozpack/copier.py @@ -164,16 +164,27 @@ class FileCopier(FileRegistry): ''' assert isinstance(destination, basestring) assert not os.path.exists(destination) or os.path.isdir(destination) result = FileCopyResult() have_symlinks = hasattr(os, 'symlink') destination = os.path.normpath(destination) + # We create the destination directory specially. We can't do this as + # part of the loop doing mkdir() below because that loop munges + # symlinks and permissions and parent directories of the destination + # directory may have their own weird schema. The contract is we only + # manage children of destination, not its parents. + try: + os.makedirs(destination) + except OSError as e: + if e.errno != errno.EEXIST: + raise + # Because we could be handling thousands of files, code in this # function is optimized to minimize system calls. We prefer CPU time # in Python over possibly I/O bound filesystem calls to stat() and # friends. required_dirs = set() dest_files = set()