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 74918 Details for
Bug 191048
[ftp] Remote files locally listed and being removed by other users should be reported as missing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch showing the remote error message
patch.txt (text/plain), 4.68 KB, created by
Javier Montalvo Orús
on 2007-07-30 07:05:43 EDT
(
hide
)
Description:
Patch showing the remote error message
Filename:
MIME Type:
Creator:
Javier Montalvo Orús
Created:
2007-07-30 07:05:43 EDT
Size:
4.68 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rse.services.files.ftp >Index: src/org/eclipse/rse/internal/services/files/ftp/FTPServiceResources.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPServiceResources.java,v >retrieving revision 1.3 >diff -u -r1.3 FTPServiceResources.java >--- src/org/eclipse/rse/internal/services/files/ftp/FTPServiceResources.java 25 Jul 2007 17:44:51 -0000 1.3 >+++ src/org/eclipse/rse/internal/services/files/ftp/FTPServiceResources.java 30 Jul 2007 10:54:43 -0000 >@@ -29,7 +29,6 @@ > public static String FTP_File_Service_Monitor_Format; > public static String FTP_File_Service_Name; > public static String FTP_File_Service_Description; >- public static String FTPService_FTP_File_Service_Not_Found; > > static { > // load message values from bundle 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:54:43 -0000 >@@ -57,6 +57,7 @@ > import java.io.BufferedOutputStream; > import java.io.File; > import java.io.FileInputStream; >+import java.io.FileNotFoundException; > import java.io.FileOutputStream; > import java.io.IOException; > import java.io.InputStream; >@@ -394,7 +395,7 @@ > { > if (monitor!=null){ > if (monitor.isCanceled()) { >- return null; >+ return new FTPHostFile(remoteParent,fileName, false, false, 0, 0, false); > } > } > >@@ -680,16 +690,6 @@ > > IHostFile remoteHostFile = getFile(remoteParent,remoteFile,null); > >- if(remoteHostFile == null) >- { >- return false; >- } >- >- if(!remoteHostFile.exists()) >- { >- throw new RemoteFileIOException(new Exception(FTPServiceResources.FTPService_FTP_File_Service_Not_Found)); >- } >- > if(_commandMutex.waitForLock(monitor, Long.MAX_VALUE)) > { > try >@@ -703,21 +703,22 @@ > > ftpClient.changeWorkingDirectory(remoteParent); > setFileType(isBinary); >- if (!localFile.exists()) >- { >- File localParentFile = localFile.getParentFile(); >- if (!localParentFile.exists()) >- { >- localParentFile.mkdirs(); >- } >- localFile.createNewFile(); >- } > >- output = new FileOutputStream(localFile); > input = ftpClient.retrieveFileStream(remoteFile); > > if(input != null) > { >+ if (!localFile.exists()) >+ { >+ File localParentFile = localFile.getParentFile(); >+ if (!localParentFile.exists()) >+ { >+ localParentFile.mkdirs(); >+ } >+ localFile.createNewFile(); >+ } >+ >+ output = new FileOutputStream(localFile); > progressMonitor.init(0, remoteFile, localFile.getName(), remoteHostFile.getSize()); > byte[] buffer = new byte[4096]; > int readCount; >@@ -740,12 +741,22 @@ > output.close(); > > ftpClient.completePendingCommand(); >+ >+ } >+ else >+ { >+ throw new RemoteFileIOException(new Exception(ftpClient.getReplyString())); > } > } >- catch (Exception e) >+ catch (FileNotFoundException e) >+ { >+ throw new RemoteFileIOException(e); >+ } >+ catch (IOException e) > { > throw new RemoteFileIOException(e); >- } finally >+ } >+ finally > { > _commandMutex.release(); > } >Index: src/org/eclipse/rse/internal/services/files/ftp/FTPServiceResources.properties >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPServiceResources.properties,v >retrieving revision 1.3 >diff -u -r1.3 FTPServiceResources.properties >--- src/org/eclipse/rse/internal/services/files/ftp/FTPServiceResources.properties 25 Jul 2007 17:44:51 -0000 1.3 >+++ src/org/eclipse/rse/internal/services/files/ftp/FTPServiceResources.properties 30 Jul 2007 10:54:43 -0000 >@@ -24,5 +24,4 @@ > FTP_File_Service_Copy_Not_Supported=FTP copy not supported, use move instead > FTP_File_Service_Listing_Job=Listing files... > FTP_File_Service_Listing_Job_Success=Success >-FTPService_FTP_File_Service_Not_Found=File not found > FTP_File_Service_Monitor_Format={0,number,integer} KB of {1,number,integer} KB complete ({2,number,percent})
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 191048
:
73989
|
74918
|
74940