aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse
diff options
context:
space:
mode:
authorRaphael Moll <ralf@android.com>2013-05-31 18:30:27 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2013-05-31 18:30:28 +0000
commitd1ead8e5a33554b917c21582922da5c0394f9e85 (patch)
treef1d641c0e0294bcf2fe1b314c606f9b6aa0dbf12 /eclipse
parentcda51888ac69ea1ee2e38d41e32012cd3192335b (diff)
parent1721a15ce401c7d3b579bcc92803c8dd0c35aaa2 (diff)
downloadsdk-d1ead8e5a33554b917c21582922da5c0394f9e85.zip
sdk-d1ead8e5a33554b917c21582922da5c0394f9e85.tar.gz
sdk-d1ead8e5a33554b917c21582922da5c0394f9e85.tar.bz2
Merge "Fix gradle export on Windows."
Diffstat (limited to 'eclipse')
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/BuildFileCreator.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/BuildFileCreator.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/BuildFileCreator.java
index b4893e8..514e728 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/BuildFileCreator.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/BuildFileCreator.java
@@ -392,7 +392,9 @@ public class BuildFileCreator {
*/
private static IPath findCommonRoot(IPath path1, IPath path2) {
// TODO: detect paths on different disk drive on Windows!
- IPath result = (IPath) Path.ROOT.clone();
+ assert path1.getDevice().equals(path2.getDevice());
+ IPath result = path1.uptoSegment(0);
+
final int count = Math.min(path1.segmentCount(), path2.segmentCount());
for (int i = 0; i < count; i++) {
if (path1.segment(i).equals(path2.segment(i))) {