[shrinkwrap-issues] [JBoss JIRA] (SHRINKWRAP-348) Deleting a directory specified by a File with a trailing slash does not work

Tommy Tynjä (JIRA) jira-events at lists.jboss.org
Fri Mar 16 19:02:47 EDT 2012


    [ https://issues.jboss.org/browse/SHRINKWRAP-348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12677435#comment-12677435 ] 

Tommy Tynjä commented on SHRINKWRAP-348:
----------------------------------------

Paths wihtin archives are represented without the trailing slash, so the above mentioned behaviour makes sense since the gwtutil path is represented within the archive as "WEB-INF/classes/org/drools/guvnor/gwtutil" (without a trailing slash). That's why the second operation works, while the first path won't match the path within the archive.

It would be nice though if the first operation (path with trailing slash) would match the path within the archive which has no trailing slash.

While writing a test case to reproduce/test this behaviour I found a bug in the Archive.contains method, where deleted paths can still be indicated as present in the archive, when they infact are not.

I'm working on a solution for both the handling of a possible trailing slash in the path, as it would be a nice feature, as well as fixing the bug in the contains-method.
                
> Deleting a directory specified by a File with a trailing slash does not work
> ----------------------------------------------------------------------------
>
>                 Key: SHRINKWRAP-348
>                 URL: https://issues.jboss.org/browse/SHRINKWRAP-348
>             Project: ShrinkWrap
>          Issue Type: Bug
>            Reporter: Geoffrey De Smet
>            Assignee: Tommy Tynjä
>            Priority: Minor
>
> We have a directory gwtutil with 10+ classes in there, which we want to delete from the archive
> This does nothing, it does not even fail-fast:
> {code}
> webArchive.delete(ArchivePaths.create("WEB-INF/classes/org/drools/guvnor/gwtutil/"));
> {code}
> This does work:
> {code}
> webArchive.delete(ArchivePaths.create("WEB-INF/classes/org/drools/guvnor/gwtutil"));
> {code}
> The difference is the absence of the trailing /.
> Using arquillian bom CR5

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the shrinkwrap-issues mailing list