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

Unified Diff: tools/vim/ninja-build.vim

Issue 9265016: vim: Let ninja-build.vim detect Release correctly if out/Debug/protoc doesn't exist at all. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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: tools/vim/ninja-build.vim
diff --git a/tools/vim/ninja-build.vim b/tools/vim/ninja-build.vim
index a8822231ad472b33d303fa2ab69c4f285ffa0e44..e753b18be5036c2fd69cfa8a592533704cd6ac4b 100644
--- a/tools/vim/ninja-build.vim
+++ b/tools/vim/ninja-build.vim
@@ -43,10 +43,13 @@ def guess_configuration():
def is_release_15s_newer(test_path):
try:
debug_mtime = os.path.getmtime(os.path.join(root, 'Debug', test_path))
+ except os.error:
+ debug_mtime = 0
+ try:
rel_mtime = os.path.getmtime(os.path.join(root, 'Release', test_path))
- return rel_mtime - debug_mtime >= 15
except os.error:
- return False
+ rel_mtime = 0
+ return rel_mtime - debug_mtime >= 15
configuration = 'Debug'
if is_release_15s_newer('build.ninja') or is_release_15s_newer('protoc'):
configuration = 'Release'
« 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