wrap stream before closing zip files.
This commit is contained in:
1 parent
fb4c40c951
commit
1b39feaab7
1 file changed
+4
-5
@@ -244,11 +244,10 @@ public class FileArgument
|
|||||||
Path rootPath = moduleRootPath(module);
|
Path rootPath = moduleRootPath(module);
|
||||||
if (rootPath == null) return null;
|
if (rootPath == null) return null;
|
||||||
String zipComponent = (zipContainer != null) ? rootPath.relativize(zipPath).toString() : null;
|
String zipComponent = (zipContainer != null) ? rootPath.relativize(zipPath).toString() : null;
|
||||||
strings = result.map(p -> {
|
strings = (zipContainer == null)
|
||||||
if (zipContainer == null)
|
? result.map(p -> rootPath.relativize(p).toString().replaceAll("[\\\\/]+", "/"))
|
||||||
return rootPath.relativize(p).toString().replaceAll("[\\\\/]+", "/");
|
// need to remove ties to the zip file system before closing, so wrapping the stream
|
||||||
return (zipComponent + '/'+ p.toString()).replaceAll("[\\\\/]+", "/");
|
: result.map(p -> (zipComponent + '/'+ p.toString()).replaceAll("[\\\\/]+", "/")).collect(Collectors.toList()).stream();
|
||||||
});
|
|
||||||
} }
|
} }
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user