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 74912 Details for
Bug 197758
[ftp] Unix symbolic links are not classified as file vs. folder
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch showing symbolic links as folders when they contain no dots
patch.txt (text/plain), 2.62 KB, created by
Javier Montalvo Orús
on 2007-07-30 06:31:50 EDT
(
hide
)
Description:
Patch showing symbolic links as folders when they contain no dots
Filename:
MIME Type:
Creator:
Javier Montalvo Orús
Created:
2007-07-30 06:31:50 EDT
Size:
2.62 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rse.services.files.ftp >Index: src/org/eclipse/rse/internal/services/files/ftp/FTPHostFile.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPHostFile.java,v >retrieving revision 1.3 >diff -u -r1.3 FTPHostFile.java >--- src/org/eclipse/rse/internal/services/files/ftp/FTPHostFile.java 25 Apr 2007 12:57:28 -0000 1.3 >+++ src/org/eclipse/rse/internal/services/files/ftp/FTPHostFile.java 30 Jul 2007 10:26:22 -0000 >@@ -34,6 +34,7 @@ > private String _name; > private String _parentPath; > private boolean _isDirectory; >+ private boolean _isLink; > private boolean _isArchive; > private long _lastModified; > private long _size; >@@ -65,6 +66,7 @@ > _name = ftpFile.getName(); > > _isDirectory = ftpFile.isDirectory(); >+ _isLink = ftpFile.isSymbolicLink(); > _lastModified = ftpFile.getTimestamp().getTimeInMillis(); > _size = ftpFile.getSize(); > _isArchive = internalIsArchive(); >@@ -92,6 +94,11 @@ > return !(_isDirectory || _isRoot); > } > >+ public boolean isSymbolicLink() >+ { >+ return _isLink; >+ } >+ > public String getName() > { > return _name; >@@ -234,4 +241,9 @@ > && !ArchiveHandlerManager.isVirtual(getAbsolutePath()); > } > >+ public void setIsDirectory(boolean isDirectory) >+ { >+ _isDirectory = isDirectory; >+ } >+ > } >\ No newline at end of file >Index: src/org/eclipse/rse/internal/services/files/ftp/FTPService.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPService.java,v >retrieving revision 1.26 >diff -u -r1.26 FTPService.java >--- src/org/eclipse/rse/internal/services/files/ftp/FTPService.java 25 Jul 2007 17:44:51 -0000 1.26 >+++ src/org/eclipse/rse/internal/services/files/ftp/FTPService.java 30 Jul 2007 10:26:23 -0000 >@@ -509,8 +510,17 @@ > _ftpLoggingOutputStream.write(rawListLine.getBytes()); > > FTPHostFile f = new FTPHostFile(parentPath, _ftpFiles[i]); >+ String name = f.getName(); >+ >+ if(f.isSymbolicLink()) { >+ if(name.indexOf('.')==-1) { >+ //modify FTPHostFile to be shown as a folder >+ f.setIsDirectory(true); >+ } >+ } >+ > if (isRightType(fileType,f)) { >- String name = f.getName(); >+ > if (name.equals(".") || name.equals("..")) { //$NON-NLS-1$ //$NON-NLS-2$ > //Never return the default directory names > continue;
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
Flags:
mober.at+eclipse
:
iplog-
Actions:
View
|
Diff
Attachments on
bug 197758
:
74672
| 74912