1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-17 05:55:22 +02:00

[233373] NPE when deleting a file from a read-only folder on Local

This commit is contained in:
David McKnight 2008-05-23 19:50:46 +00:00
parent 788cece9b2
commit 5d71236868

View file

@ -38,6 +38,7 @@
* Martin Oberhuber (Wind River) - [226262] Make IService IAdaptable * Martin Oberhuber (Wind River) - [226262] Make IService IAdaptable
* David McKnight (IBM) - [231211] Local xml file not opened when workspace encoding is different from local system encoding * David McKnight (IBM) - [231211] Local xml file not opened when workspace encoding is different from local system encoding
* Radoslav Gerganov (ProSyst) - [230919] IFileService.delete() should not return a boolean * Radoslav Gerganov (ProSyst) - [230919] IFileService.delete() should not return a boolean
* David McKnight (IBM) - [233373] NPE when deleting a file from a read-only folder on Local
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.services.local.files; package org.eclipse.rse.internal.services.local.files;
@ -1051,8 +1052,11 @@ public class LocalFileService extends AbstractFileService implements ILocalServi
if (fileToDelete.exists()) { if (fileToDelete.exists()) {
// Deletion failed without specification why... likely a Security // Deletion failed without specification why... likely a Security
// problem? // problem?
throw new RemoteFileSecurityException(null); // TODO we'll want to wrap a message with the IOException at some point after
} else { // 3.0.1
throw new RemoteFileSecurityException(new IOException());
}
else {
throw new SystemElementNotFoundException(fileToDelete.getAbsolutePath(), "delete"); //$NON-NLS-1$ throw new SystemElementNotFoundException(fileToDelete.getAbsolutePath(), "delete"); //$NON-NLS-1$
} }
} }