summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormattinger <[email protected]>2007-04-25 17:56:47 +0000
committermattinger <[email protected]>2007-04-25 17:56:47 +0000
commitae01e448fc655abe2cdf5fee708b4c6c45212a60 (patch)
tree6db50da96d98a9ce2ea35269e4691b55927e0bac /src
parent4973a9d17b55dd93176cdb8985a42e03e9ae0619 (diff)
Recognize relative file: based urls, and use the ant project's basedir
as the starting point. git-svn-id: file:///home/sven/projects/JOGL/temp/ant-contrib/svn/ant-contrib-code/trunk/ant-contrib@116 32d7a393-a5a9-423c-abd3-5d954feb1f2f
Diffstat (limited to 'src')
-rwxr-xr-xsrc/java/net/sf/antcontrib/net/URLImportTask.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/java/net/sf/antcontrib/net/URLImportTask.java b/src/java/net/sf/antcontrib/net/URLImportTask.java
index 2e14f23..6114368 100755
--- a/src/java/net/sf/antcontrib/net/URLImportTask.java
+++ b/src/java/net/sf/antcontrib/net/URLImportTask.java
@@ -123,7 +123,12 @@ public class URLImportTask
configure.init();
if (ivyConfUrl != null) {
if (ivyConfUrl.getProtocol().equalsIgnoreCase("file")) {
- configure.setFile(new File(ivyConfUrl.getPath()));
+ String path = ivyConfUrl.getPath();
+ File f = new File(path);
+ if (! f.isAbsolute()) {
+ f = new File(getProject().getBaseDir(), path);
+ }
+ configure.setFile(f);
}
else {
try {