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

Unified Diff: dart/tools/make_links.py

Issue 343653006: Handle deletion of files in package dir on Windows. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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 5061c26f07b8008fcdea34f9541f652b1427cc09..0874ca8f5a6c6d67d735088560939c6e36fd6c83 100644
--- a/dart/tools/make_links.py
+++ b/dart/tools/make_links.py
@@ -73,12 +73,13 @@ 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):
- if utils.GuessOS() == 'win32':
- # It seems like python on windows is treating pseudo symlinks to
+ full_link = os.path.join(target, link)
+ if os.path.isdir(full_link) and utils.IsWindows():
+ # It seems like python on Windows is treating pseudo symlinks to
# directories as directories.
- os.rmdir(os.path.join(target, link))
+ os.rmdir(full_link)
else:
- os.remove(os.path.join(target, link))
+ os.remove(full_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