Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 367283 - [ssh] IFileStore.copy from local to remote fails
Summary: [ssh] IFileStore.copy from local to remote fails
Status: NEW
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: dsdp.tm.rse-inbox CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-21 05:03 EST by George Dinkov CLA
Modified: 2011-12-21 05:03 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description George Dinkov CLA 2011-12-21 05:03:36 EST
Build Identifier: I20110613-1736

When doing IFileStore.copy with EFS.NONE flag the operation fails sometimes with:
Caused by: org.eclipse.core.runtime.CoreException: File already exists on disk: rse://remote-machine/home/ciuser/ci_workspace/OneFileProject/.project.
	at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:55)
	at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:50)
	at org.eclipse.core.filesystem.provider.FileStore.copyFile(FileStore.java:208)
	at org.eclipse.core.filesystem.provider.FileStore.copy(FileStore.java:143)
	at org.eclipse.core.internal.filesystem.local.LocalFile.copy(LocalFile.java:111)
	at org.eclipse.core.filesystem.provider.FileStore.copyDirectory(FileStore.java:181)
	at org.eclipse.core.filesystem.provider.FileStore.copy(FileStore.java:141)
	at org.eclipse.core.internal.filesystem.local.LocalFile.copy(LocalFile.java:111)

As I tried to debug the problem, it seems that on some point the verification in org.eclipse.core.filesystem.provider.FileStore.copyFile(IFileInfo, IFileStore, int, IProgressMonitor) fails because it says that the remote file exists, but the file doesn't exist on the remote machine. The remote file is taken from org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystem._cachedRemoteFiles.
This happens only on our CI machine for executing tests, but we cannot reproduce it on other machines.
An easy workaround for this is to copy the files with the EFS.OVERWRITE flag always.

Reproducible: Sometimes

Steps to Reproduce:
I can't provide easy steps to reproduce. It happens when copying from the local to a remote machine (Red Hat 5.5) using the ssh file service with IFileStore.copy. It only happens on our CI machine and I cannot reproduce it on other machines.