Bug 197784 - [regression][filters] cannot expand folders below Root filter
Summary: [regression][filters] cannot expand folders below Root filter
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P1 blocker (vote)
Target Milestone: 2.0.1   Edit
Assignee: David McKnight CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords:
Depends on: 197089
Blocks:
  Show dependency tree
 
Reported: 2007-07-25 08:40 EDT by Martin Oberhuber CLA
Modified: 2007-07-25 13:19 EDT (History)
4 users (show)

See Also:


Attachments
fix to also check for separators at 0 (1.47 KB, patch)
2007-07-25 09:28 EDT, David McKnight CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Oberhuber CLA 2007-07-25 08:40:37 EDT
RSE I20070724-0735 on Linux or Windows:

Create a connection (I tested Linux-dstore and SSH Only).
Expand "Root" > / > /bin
No contents is shown.
Other folders below / only show sub directories but no files.
The error log does not show any exception.

With RSE 2.0.0.1 this worked correctly, and also RSE I20070719-1300 was OK.
This makes the candidate changes for this regression small:
   bug 197089 Need to set the filter when no separator in filter string
   bug 197484 Fix for SystemView to provide ContextObject on all levels

Supposedly as a side effect of this bug, "Show in Table" is not available on expanded folders anywhere below the "Root" filter; it is available on collapsed folders and on any folders below "My Home".
Comment 1 Martin Oberhuber CLA 2007-07-25 08:42:48 EDT
Dave please address this with maximum priority.

I'm pretty sure that the two bugs listed are the only candidates that introduced this regression, because the regression happens on BOTH dstore and ssh and all other fixes released between I20070719-1300 and I20070724-0735 affect different components of RSE or affect only dstore or only SSH.
Comment 2 David McKnight CLA 2007-07-25 09:18:11 EDT
The problem appears to be with the fix for 197089, where we set the filter to the filterString.  I'll investigate.

Comment 3 Martin Oberhuber CLA 2007-07-25 09:26:28 EDT
Javier noticed:

It happens in my workspace that the filename filter passed to org.eclipse.rse.internal.services.files.ftp.FTPService.internalFetch(String, String, int, IProgressMonitor) 
in "My Home" is correct ("*") but under "Root" the filter is incorrectly passed as  "/*" in all subfolders under "Root"  which prevents any file being shown. 

Setting the bug to "blocker" since it blocks Javier from doing development on bug #197105 (gee that's our first valid blocker!)
Comment 4 David McKnight CLA 2007-07-25 09:28:51 EDT
Created attachment 74556 [details]
fix to also check for separators at 0
Comment 5 David McKnight CLA 2007-07-25 09:31:46 EDT
I've put in a fix for this.  The problem was that in getting the last separator we were checking if the sepIndex is > 0 instead of >= 0:

int sepIndex = filterString.lastIndexOf(separator);
if (sepIndex > 0)  <---- PROBLEM
{
 filter = filterString.substring(sepIndex + 1);
}
else
{
 // fix for 197089
 filter = filterString;
}

I've attached a patch of the fix and applied to cvs.
Comment 6 Xuan Chen CLA 2007-07-25 11:08:13 EDT
There is a similar fix for dstore, which has not been committed.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=190824

I will check in the code once I get the eclipse id.
Comment 7 Martin Oberhuber CLA 2007-07-25 13:19:19 EDT
Released for I20070726-0600 tomorrow