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

Unified Diff: copy_apprtc.py

Issue 977833003: Work around long path deletion problem on Windows. (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/webrtc/webrtc.DEPS
Patch Set: Created 5 years, 10 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: copy_apprtc.py
diff --git a/copy_apprtc.py b/copy_apprtc.py
index 2ed2e954de6b9990c24e3000f61cd782a08e0631..8cc40b15260719d6b7ecc92f57c4211dff270a7a 100755
--- a/copy_apprtc.py
+++ b/copy_apprtc.py
@@ -10,6 +10,8 @@ import os
import shutil
import sys
+import utils
+
def _ConfigureApprtcServerToDeveloperMode(app_yaml_path):
if not os.path.exists(app_yaml_path):
@@ -25,7 +27,12 @@ def _ConfigureApprtcServerToDeveloperMode(app_yaml_path):
def main():
target_dir = os.path.join('src', 'out', 'apprtc')
- shutil.rmtree(target_dir, ignore_errors=True)
+ if utils.GetPlatform() is 'win':
+ # Windows shutil can't handle the long node.js paths when deleting;
+ # work around the problem.
+ os.system('rmdir /s /q %s' % target_dir)
+ else:
+ shutil.rmtree(target_dir, ignore_errors=True)
shutil.copytree('apprtc',
target_dir, ignore=shutil.ignore_patterns('.svn', '.git'))
« 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