| Summary: | Copy of file via RemoteToolsFileStore broken | ||
|---|---|---|---|
| Product: | [Tools] PTP | Reporter: | Emmanuel Geay <egeay> |
| Component: | Remote Tools | Assignee: | Greg Watson <g.watson> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | beth, egeay, g.watson |
| Version: | 3.0 | ||
| Target Milestone: | 3.0.1 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 300889 | ||
this is manifesting itself in an X10DT remote C++ backend scenario I've checked in the fix which is the previous version of FileTools. This fixes our problem that manifests itself in X10DT. Note that I checked this into the PTP_3_0 branch. I don't know what the status of HEAD is. Does it need it too? Yes, it's needed too in HEAD... Or providing a different fix of course. This is about to be superseded by a patch that hopefully fixes a range of remote tools issues. Go ahead and apply anyway if you want though. This should now be fixed in head. Please test and report any problems. This should now be fixed. Please reopen if the problem persists. |
Hi, Remote copy of file seems to experience a race condition issue. If I run the next test case: final IResourceManagerControl rmControl = (IResourceManagerControl) resourceManager; final IResourceManagerConfiguration rmc = rmControl.getConfiguration(); final IRemoteServices rmServices = PTPRemoteCorePlugin.getDefault().getRemoteServices(rmc.getRemoteServicesId()); final IRemoteConnection rmConnection = rmServices.getConnectionManager().getConnection(rmc.getConnectionName()); final IRemoteFileManager fileManager = rmServices.getFileManager(rmConnection); final IFileSystem fileSystem = EFS.getLocalFileSystem(); final IFileStore logFileStore = fileSystem.getStore(new Path("C:/log.txt")); logFileStore.copy(fileManager.getResource("/tmp").getChild("log.txt"), EFS.NONE, new NullProgressMonitor()); It fails for me with the following exception: org.eclipse.core.runtime.CoreException: Failed to set permission of remote file /tmp/log.txt (No such file) at org.eclipse.ptp.remote.remotetools.core.RemoteToolsFileStore.putInfo(RemoteToolsFileStore.java:398) at org.eclipse.core.filesystem.provider.FileStore.transferAttributes(FileStore.java:489) at org.eclipse.core.filesystem.provider.FileStore.copyFile(FileStore.java:220) at org.eclipse.core.filesystem.provider.FileStore.copy(FileStore.java:140) at org.eclipse.core.internal.filesystem.local.LocalFile.copy(LocalFile.java:110) ... Caused by: org.eclipse.ptp.remotetools.exception.RemoteOperationException: Failed to set permission of remote file /tmp/log.txt (No such file) at org.eclipse.ptp.remotetools.internal.ssh.RemoteItem.commitAttributes(RemoteItem.java:75) at org.eclipse.ptp.remote.remotetools.core.RemoteToolsFileStore.putInfo(RemoteToolsFileStore.java:396) ... 56 more Caused by: 2: No such file at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2289) at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:1741) at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:1758) at com.jcraft.jsch.ChannelSftp.chmod(ChannelSftp.java:1604) at org.eclipse.ptp.remotetools.internal.ssh.RemoteItem.commitAttributes(RemoteItem.java:72) ... 57 more If I change the version of org.eclipse.ptp.remotetools.internal.ssh.FileTools to the previous revision (ie 1.9), it works again. Thanks, Emmanuel.