litesoft
Diff Revisions
360
vs
889
for /trunk/Java/ScarPlus/src/com/esotericsoftware/filesystem/Paths.java
|
@@ -4,6 +4,7 @@ |
4 |
4 |
|
import java.util.*; |
5 |
5 |
|
import java.util.zip.*; |
6 |
6 |
|
|
|
7 |
+ |
import com.esotericsoftware.scar.Utils; |
7 |
8 |
|
import com.esotericsoftware.utils.*; |
8 |
9 |
|
import com.esotericsoftware.wildcard.*; |
9 |
10 |
|
|
|
@@ -250,13 +251,14 @@ |
250 |
251 |
|
/** |
251 |
252 |
|
* Returns the portion of the path after the root directory where the path was collected. |
252 |
253 |
|
*/ |
253 |
|
- |
public List<String> getRelativePaths() |
|
254 |
+ |
public List<String> getRelativePaths( String pCanonicalJarPath ) |
254 |
255 |
|
{ |
|
256 |
+ |
File zCanonicalJarDir = new File(pCanonicalJarPath).getParentFile(); |
255 |
257 |
|
List<FilePath> zPaths = getPaths(); |
256 |
258 |
|
List<String> rv = new ArrayList<String>( zPaths.size() ); |
257 |
259 |
|
for ( FilePath path : zPaths ) |
258 |
260 |
|
{ |
259 |
|
- |
rv.add( path.getFileSubPath() ); |
|
261 |
+ |
rv.add(path.relativeFromDir(zCanonicalJarDir)); |
260 |
262 |
|
} |
261 |
263 |
|
return rv; |
262 |
264 |
|
} |