diff options
author | Raphael Moll <ralf@android.com> | 2013-05-31 11:22:31 -0700 |
---|---|---|
committer | Raphael Moll <ralf@android.com> | 2013-05-31 11:22:31 -0700 |
commit | 1721a15ce401c7d3b579bcc92803c8dd0c35aaa2 (patch) | |
tree | 973f5f0f3529812cb4f1da482f24e9a0c058f046 /eclipse | |
parent | cd7f7686245951574700b85985e3470141a7e2ad (diff) | |
download | sdk-1721a15ce401c7d3b579bcc92803c8dd0c35aaa2.zip sdk-1721a15ce401c7d3b579bcc92803c8dd0c35aaa2.tar.gz sdk-1721a15ce401c7d3b579bcc92803c8dd0c35aaa2.tar.bz2 |
Fix gradle export on Windows.
Only minor issue was in the method that computes
the common root, it was forgetting to set the
path's device value.
Change-Id: Ie4efc4a733514cf2620e27b735d85a5750194b3f
Diffstat (limited to 'eclipse')
-rw-r--r-- | eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/BuildFileCreator.java | 4 |
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))) { |