Merge branch 'stable-2.15' into stable-2.16

* stable-2.15:
  download_file.py: Fix root workspace directory detection

Change-Id: Ib8e0bb051d97010497e0d7b9184537a0dc52662a
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)