Merge branch 'stable-3.0'
* stable-3.0:
download_file.py: Fix root workspace directory detection
Change-Id: Ifa50eeb0db405fdf0fcfacc22e6c5466ae3983dd
diff --git a/tools/download_file.py b/tools/download_file.py
index 534a6d5..8f790be 100755
--- a/tools/download_file.py
+++ b/tools/download_file.py
@@ -84,9 +84,9 @@
args, _ = opts.parse_args()
root_dir = args.o
-while root_dir and root_dir != "/":
+while root_dir and path.dirname(root_dir) != root_dir:
root_dir, n = path.split(root_dir)
- if n == 'buck-out':
+ if n == 'WORKSPACE':
break
redirects = download_properties(root_dir)