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

Unified Diff: build/symlink.py

Issue 1632073002: dont symlink if it's already correctly linked (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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: build/symlink.py
diff --git a/build/symlink.py b/build/symlink.py
index 75a3e4e6d156fb75f3a59d339ecc1e0c4479b0ae..21b79b9a46754db70604d1962d044b43df38d895 100755
--- a/build/symlink.py
+++ b/build/symlink.py
@@ -28,6 +28,8 @@ def Main(argv):
t = os.path.join(target, os.path.basename(s))
if len(sources) == 1 and not os.path.isdir(target):
t = target
+ if os.path.realpath(t) == s:
+ continue
try:
os.symlink(s, t)
except OSError, e:
« 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