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 74672 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 the destination folder exists
patch.txt (text/plain), 2.93 KB, created by
Javier Montalvo Orús
on 2007-07-26 07:49:49 EDT
(
hide
)
Description:
patch showing symbolic links as folders when the destination folder exists
Filename:
MIME Type:
Creator:
Javier Montalvo Orús
Created:
2007-07-26 07:49:49 EDT
Size:
2.93 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 26 Jul 2007 11:43:48 -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 26 Jul 2007 11:43:48 -0000 >@@ -509,6 +509,22 @@ > _ftpLoggingOutputStream.write(rawListLine.getBytes()); > > FTPHostFile f = new FTPHostFile(parentPath, _ftpFiles[i]); >+ >+ if(f.isSymbolicLink()) >+ { >+ //attempt to access the destination folder, if success then it's a folder >+ //otherwise leave it as a file (default), the operation is not shown in the console >+ _ftpClient.registerSpyStream(null); >+ if(_ftpClient.changeWorkingDirectory(f.getAbsolutePath())) >+ { >+ //success, revert working directory >+ _ftpClient.changeWorkingDirectory(parentPath); >+ //modify FTPHostFile to be shown as a folder >+ f.setIsDirectory(true); >+ } >+ _ftpClient.registerSpyStream(_ftpLoggingOutputStream); >+ } >+ > if (isRightType(fileType,f)) { > String name = f.getName(); > if (name.equals(".") || name.equals("..")) { //$NON-NLS-1$ //$NON-NLS-2$
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 197758
:
74672
|
74912