Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2115)

Unified Diff: chrome/browser/resources/chromeos/chromevox/tools/jsbundler.py

Issue 2421613003: chromevox: Fix a racy failure in directory creation in jsbundler.py. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/chromevox/tools/jsbundler.py
diff --git a/chrome/browser/resources/chromeos/chromevox/tools/jsbundler.py b/chrome/browser/resources/chromeos/chromevox/tools/jsbundler.py
index 81a80f9daaa26b2a1d504024408d2a29eeae48e7..5483ac2a56aeecca511ffcde6faec18f82be45b7 100755
--- a/chrome/browser/resources/chromeos/chromevox/tools/jsbundler.py
+++ b/chrome/browser/resources/chromeos/chromevox/tools/jsbundler.py
@@ -30,6 +30,7 @@ ways:
'''
+import errno
import optparse
import os
import re
@@ -233,8 +234,11 @@ def LinkOrCopyFiles(sources, dest_dir):
'''Copies a list of sources to a destination directory.'''
def LinkOrCopyOneFile(src, dst):
- if not os.path.exists(os.path.dirname(dst)):
+ try:
os.makedirs(os.path.dirname(dst))
+ except OSError as err:
+ if err.errno != errno.EEXIST:
+ raise
if os.path.exists(dst):
os.unlink(dst)
try:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698