commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark O'Donohue (JIRA)" <>
Subject [jira] Commented: (VFS-288) unable to browse hidden directories (regression fix overrode VFS-210:)
Date Fri, 06 Nov 2009 23:02:32 GMT


Mark O'Donohue commented on VFS-288:

Hi Ralph

Yep, I understand I added the patch to my local copy only cause I needed it.

I also have a patch to let writing to hidden directories work, as that too has a similar problem.

I wonder if this needs to be put into a FTP options thing then, some setting to allow  IMAGINARY
files to be treated as hidden directories.

That way it could pass the normal tests, but still allow a special mode for hidden directory

FYI: Below is an additional  test I had to comment out to get writing to hidden directories
to work.
                   in    method public OutputStream getOutputStream(boolean bAppend) throws

       what was happening was since it was imaginary, it was doing the whole recursive check
parent thing.

      I did think first to overwrite :  getOutputStream(boolean bAppend) iin
but there seemed to be a pattern of:
      getOutputStream() -> doGetOutputStream and only the doGet was overwritten and the
getXXX was not.

      If we were to go with put it as an option, how would you recommend i move that test
out so i can overwrite it 
      in the ftp specific one?

Cheers - Mark

---     (revision 829303)
+++     (working copy)
@@ -1381,6 +1381,7 @@
             throw new FileSystemException("vfs.provider/write-append-not-supported.error",
+/*  MOD::: 
         if (getType() == FileType.IMAGINARY)
 // Does not exist - make sure parent does
@@ -1390,6 +1391,7 @@
 // Get the raw output stream

> unable to browse hidden directories (regression fix overrode VFS-210:) 
> -----------------------------------------------------------------------
>                 Key: VFS-288
>                 URL:
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.0
>         Environment: java
>            Reporter: Mark O'Donohue
>         Attachments: patch.diff
> The regression fix: 
>       r742127 | rgoers | 2009-02-09 03:37:32 +1100 (Mon, 09 Feb 2009) | 1 line
>       Fix unit test - throw exception if child is not a directory
> Now means that FTP hidden directories cannot be listed, since the getType() has to return
a DIRECTORY value.  The overwrote the earlier change:
>       ------------------------------------------------------------------------
>       r659785 | imario | 2008-05-24 20:32:41 +1000 (Sat, 24 May 2008) | 1 line
>       VFS-210: First development iteration. Most important methods now work more like
a wrapper,    you should already see a major increase in performance with ftp and large directories
as long as no method (or your code) calls getFileType(). Hidden and special files should work
now too .. as long as you know the path, for sure.
> That allowed hidden directories to be listed. 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message