Community
Participate
Working Groups
To search in archive files you need to check the check box for Search Archive Files. If I right click on a folder inside an archive already and select "Search" it would be nice if the check box was already checked for me.
Kushal, you are doing archive support and search... sounds like this is yours
Created attachment 72742 [details] Checks Search Archive's checkbox when selecting an archive or file in an archive Legal Message: I, Kevin Doyle, declare that I developed attached code from scratch, without referencing any 3rd party materials except material licensed under the EPL. I am authorized by my employer, IBM Canada Ltd. to make this contribution under the EPL.
Xuan there is a patch from Kevin attached - but you've been dealing most with archives, could you have a look? Dave could you commit it?
I will review it. Thanks.
The patch looks good in general. Just a couple suggestions: . Maybe we could move the checking for virtual file "absPath.indexOf(ArchiveHandlerManager.VIRTUAL_SEPARATOR)" to a method, probably in ArchiveHandlerManager. This way we could make the code cleaner, and could deal with checking null point in a place. . right now, the code takes care of the case when search Folder is an archive file or a virtual folder. It will be nice if we could also detect the file name pattens, and check the checkbox if it contains .zip, .jar, etc.
It would be good to move the checking to a method in ArchiveHandlerManager however, since it's API that would have to wait for a future release. Are we okay with committing the code as is for now?
Xuan, we don't need to check the extensions to determine if a file is an archive. This line of code does it and for folders under it: isPartOfArchive = supportsSearch && supportsArchiveManagement && (remoteFile.isArchive() || (absPath.indexOf(ArchiveHandlerManager.VIRTUAL_SEPARATOR) > 0)); remoteFile.isArchive() will return true on zip, tar, and jar files. Checking the path is for files under the archive.
It is fine with me. Kevin, could you please open an enhancement for also recognizing some zip file patterns if user changed/add something in the File name patterns field? Thanks.
Xuan, bug #196378 has been opened for checking "Search Archive files" when entering an archive handler extension in the file name patterns text box.
I've committed the fix to cvs.
(In reply to comment #7) > remoteFile.isArchive() will return true on zip, tar, and jar files. The way that RemoteFile.isArchive() is implemented, it check with the (client's) ArchiveHandlerManager whether the file is an archive. I find that problematic since different archive handlers may be installed on the (dstore) server than on the client. How would we treat the case where an extender contributed some tgz, or tar.bz2 archive handlers on the client only but not on the dstore server? Should we file a new bug for handling this properly?
Martin, I think a separate bug would be a good idea. Ideally, if an archive handler is registered on the client or the server, it would automatically send to the other side if it's not there. Currently, there are two separate registration mechanisms for the client and server because we did not resolve this issue. For the time being though, the implementation of RemoteFile.isArchive() could be changed.
Verified fixed with I20070713-0605 and opened bug #196578 for isArchive() issue.