Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 18327 Details for
Bug 85257
FTP can not view subdirectories
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch for org/eclipse/target/internal/ftp/FtpSite.java v1.2 and org/eclipse/target/internal/ftp/FtpTargetResource.java v1.3
subdirs.patch.txt (text/plain), 2.81 KB, created by
Guillaume Boudreau
on 2005-02-25 18:02:53 EST
(
hide
)
Description:
Patch for org/eclipse/target/internal/ftp/FtpSite.java v1.2 and org/eclipse/target/internal/ftp/FtpTargetResource.java v1.3
Filename:
MIME Type:
Creator:
Guillaume Boudreau
Created:
2005-02-25 18:02:53 EST
Size:
2.81 KB
patch
obsolete
>Index: org/eclipse/target/internal/ftp/FtpSite.java >=================================================================== >RCS file: /home/eclipse/platform-vcm-home/plugins/target/org.eclipse.target.ftp/src/org/eclipse/target/internal/ftp/FtpSite.java,v >retrieving revision 1.2 >diff -u -r1.2 FtpSite.java >--- org/eclipse/target/internal/ftp/FtpSite.java 22 Feb 2005 19:46:11 -0000 1.2 >+++ org/eclipse/target/internal/ftp/FtpSite.java 25 Feb 2005 22:53:22 -0000 >@@ -35,8 +35,18 @@ > private boolean passive = false; > > private Map openClients = new HashMap(); >- >+ >+ private int numSkipSubdirs = 0; >+ > public FtpSite() { >+ } >+ >+ public int getNumSkipSubdirs() { >+ return this.numSkipSubdirs; >+ } >+ >+ public void setNumSkipSubdirs(int num) { >+ this.numSkipSubdirs = num; > } > > /* (non-Javadoc) >Index: org/eclipse/target/internal/ftp/FtpTargetResource.java >=================================================================== >RCS file: /home/eclipse/platform-vcm-home/plugins/target/org.eclipse.target.ftp/src/org/eclipse/target/internal/ftp/FtpTargetResource.java,v >retrieving revision 1.3 >diff -u -r1.3 FtpTargetResource.java >--- org/eclipse/target/internal/ftp/FtpTargetResource.java 22 Feb 2005 19:46:11 -0000 1.3 >+++ org/eclipse/target/internal/ftp/FtpTargetResource.java 25 Feb 2005 22:53:22 -0000 >@@ -11,6 +11,7 @@ > package org.eclipse.target.internal.ftp; > > import java.io.InputStream; >+import java.util.Date; > > import org.eclipse.core.runtime.*; > import org.eclipse.ftp.*; >@@ -79,12 +80,30 @@ > */ > public ITargetResource[] members(IProgressMonitor monitor) throws CoreException { > if (isDirectory()) { >+ FtpSite ftpSite = (FtpSite)this.getSite(); >+ int numSkipSubdirs = ftpSite.getNumSkipSubdirs(); >+ if (this.siteRelativePath.equals("")) { >+ numSkipSubdirs = 0; >+ } >+ // Skip FTP subdirs listing >+ if (numSkipSubdirs > 0) { >+ // Add a dummy entry as a child to make the TreeView show the "+" >+ final IDirectoryEntry entry = new FTPDirectoryEntry("",true,false,0,new Date()); >+ ITargetResource[] members = new ITargetResource[1]; >+ members[0] = new FtpTargetResource(getSite(), Utils.appendPath(getRelativePath(), entry.getName()), entry); >+ ftpSite.setNumSkipSubdirs(numSkipSubdirs-1); >+ return members; >+ } > final IDirectoryEntry[] entries = listFiles(getRelativePath(), false, monitor); > ITargetResource[] members = new ITargetResource[entries.length]; > for (int i = 0; i < entries.length; i++) { > IDirectoryEntry entry = entries[i]; > members[i] = new FtpTargetResource(getSite(), Utils.appendPath(getRelativePath(), entry.getName()), entry); >+ if (members[i].isDirectory()) { >+ numSkipSubdirs++; >+ } > } >+ ftpSite.setNumSkipSubdirs(numSkipSubdirs); > return members; > } else { > return new ITargetResource[0];
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 85257
:
18326
| 18327