mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-15 04:55:22 +02:00
[225573] dstore] client not falling back to single operation when missing batch descriptors (due to old server)
This commit is contained in:
parent
511e584ff4
commit
f765df3187
1 changed files with 47 additions and 22 deletions
|
@ -39,6 +39,7 @@
|
|||
* David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
|
||||
* Radoslav Gerganov (ProSyst) - [216195] [dstore] Saving empty file fails
|
||||
* David McKnight (IBM) - [220379] [api] Provide a means for contributing custom BIDI encodings
|
||||
* David McKnight (IBM) - [225573] dstore] client not falling back to single operation when missing batch descriptors (due to old server)
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.services.dstore.files;
|
||||
|
@ -1393,8 +1394,10 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
|
|||
DataElement de = getElementFor(remotePath);
|
||||
if (de != null) dataElements.add(de);
|
||||
}
|
||||
|
||||
DataElement status = dsStatusCommand((DataElement) dataElements.get(0), dataElements, IUniversalDataStoreConstants.C_DELETE_BATCH, monitor);
|
||||
if (status == null) return false;
|
||||
if (status != null)
|
||||
{
|
||||
if (null != monitor && monitor.isCanceled())
|
||||
{
|
||||
//This operation has been canceled by the user.
|
||||
|
@ -1417,6 +1420,18 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
|
|||
throw new SystemMessageException(msg);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// no delete batch descriptor so need to fall back to single command approach
|
||||
boolean result = true;
|
||||
for (int i = 0; i < remoteParents.length && result; i++){
|
||||
String parent = remoteParents[i];
|
||||
String name = fileNames[i];
|
||||
result = delete(parent, name, monitor);
|
||||
}
|
||||
return result;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public boolean rename(String remoteParent, String oldName, String newName, IProgressMonitor monitor) throws SystemMessageException
|
||||
{
|
||||
|
@ -1734,7 +1749,17 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
|
|||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
else {
|
||||
// no copy batch descriptor so need to fall back to single command approach
|
||||
boolean result = true;
|
||||
for (int i = 0; i < srcParents.length && result; i++){
|
||||
String parent = srcParents[i];
|
||||
String name = srcNames[i];
|
||||
result = copy(parent, name, tgtParent, name, monitor);
|
||||
}
|
||||
return result;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue