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

Unified Diff: dart/tools/make_links.py

Issue 32433011: Use os.rmdir() for symlinks on windows. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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: dart/tools/make_links.py
diff --git a/dart/tools/make_links.py b/dart/tools/make_links.py
index ca464ff8e5148d4c4d0f27f892194c3001bbc07e..1893f2d41ac6906022423e0b67a106e89196e888 100644
--- a/dart/tools/make_links.py
+++ b/dart/tools/make_links.py
@@ -67,7 +67,12 @@ def main(argv):
# it. This is necessary, otherwise we can end up having links in there
# pointing to directories which no longer exist (on incremental builds).
for link in os.listdir(target):
- os.remove(os.path.join(target, link))
+ if utils.GuessOS() == 'win32':
+ # It seems like python on windows is treating pseudo symlinks to
+ # directories as directories.
+ os.rmdir(os.path.join(target, link))
+ else:
+ os.remove(os.path.join(target, link))
else:
os.makedirs(target)
for source in args[1:]:
« 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