mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-04 15:45:25 +02:00
[210555] fix: [regression]NPE when deleting a file on SSH
This commit is contained in:
parent
337f99c65a
commit
c3642f1be2
2 changed files with 17 additions and 5 deletions
|
@ -26,6 +26,7 @@
|
|||
* Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
|
||||
* Xuan Chen (IBM) - [209828] Need to move the Create operation to a job.
|
||||
* David McKnight (IBM) - [210109] store constants in IFileService rather than IFileServiceConstants
|
||||
* Xuan Chen (IBM) - [210555] [regression] NPE when deleting a file on SSH
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.services.local.files;
|
||||
|
@ -1034,6 +1035,21 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
|||
}
|
||||
}
|
||||
|
||||
public boolean deleteBatch(String[] remoteParents, String[] fileNames, IProgressMonitor monitor) throws SystemMessageException
|
||||
{
|
||||
boolean ok = true;
|
||||
SystemMessage msg = getMessage("RSEF1315"); //$NON-NLS-1$
|
||||
String deletingMessage = msg.makeSubstitution("").getLevelOneText(); //$NON-NLS-1$
|
||||
monitor.beginTask(deletingMessage, remoteParents.length);
|
||||
for (int i = 0; i < remoteParents.length; i++)
|
||||
{
|
||||
monitor.subTask(msg.makeSubstitution(fileNames[i]).getLevelOneText());
|
||||
ok = ok && delete(remoteParents[i], fileNames[i], monitor);
|
||||
monitor.worked(1);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
private boolean deleteContents(File folder, IProgressMonitor monitor)
|
||||
{
|
||||
boolean result = true;
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
* David McKnight (IBM) - [210109] store constants in IFileService rather than IFileServiceConstants
|
||||
* Martin Oberhuber (Wind River) - [210109] no need to declare IFileService constants in AbstractFileService
|
||||
* David McKnight (IBM) - [209704] [api] Ability to override default encoding conversion needed.
|
||||
* Xuan Chen (IBM) - [210555] [regression] NPE when deleting a file on SSH
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.services.files;
|
||||
|
@ -131,14 +132,9 @@ public abstract class AbstractFileService implements IFileService
|
|||
public boolean deleteBatch(String[] remoteParents, String[] fileNames, IProgressMonitor monitor) throws SystemMessageException
|
||||
{
|
||||
boolean ok = true;
|
||||
SystemMessage msg = getMessage("RSEF1315"); //$NON-NLS-1$
|
||||
String deletingMessage = msg.makeSubstitution("").getLevelOneText(); //$NON-NLS-1$
|
||||
monitor.beginTask(deletingMessage, remoteParents.length);
|
||||
for (int i = 0; i < remoteParents.length; i++)
|
||||
{
|
||||
monitor.subTask(msg.makeSubstitution(fileNames[i]).getLevelOneText());
|
||||
ok = ok && delete(remoteParents[i], fileNames[i], monitor);
|
||||
monitor.worked(1);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue