1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-03 15:15:25 +02:00

[191548] fix Deleting Read-Only directory removes it from view and displays no error

This commit is contained in:
Xuan Chen 2007-08-11 03:26:56 +00:00
parent 111a73530a
commit 69bf47f7ae
2 changed files with 12 additions and 11 deletions

View file

@ -22,6 +22,7 @@
* Xuan Chen (IBM) - [198046] [dstore] Cannot copy a folder into an archive file
* Xuan Chen (IBM) - [191367] with supertransfer on, Drag & Drop Folder from DStore to DStore doesn't work
* Martin Oberhuber (Wind River) - [199548] Avoid touching files on setReadOnly() if unnecessary
* Kevin Doyle (IBM) - [191548] Deleting Read-Only directory removes it from view and displays no error
*******************************************************************************/
package org.eclipse.rse.dstore.universal.miners;
@ -957,6 +958,7 @@ public class UniversalFileSystemMiner extends Miner {
DataElement parent = subject.getParent();
_dataStore.deleteObject(parent, subject);
_dataStore.refresh(parent);
status.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS + "|" + deleteObj.getAbsolutePath()); //$NON-NLS-1$
}
} else {
UniversalServerUtilities
@ -2136,6 +2138,7 @@ public class UniversalFileSystemMiner extends Miner {
DataElement parent = subject.getParent();
_dataStore.deleteObject(parent, subject);
_dataStore.refresh(parent);
status.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS);
}
}

View file

@ -17,6 +17,7 @@
* Kushal Munir (IBM) - [189352] Replace with appropriate line end character on upload
* David McKnight (IBM) - [190803] Canceling a long-running dstore job prints "InterruptedException" to stdout
* David McKnight (IBM) - [196035] Wrapper SystemMessageExceptions for createFile and createFolder with RemoteFileSecurityException
* Kevin Doyle (IBM) - [191548] Deleting Read-Only directory removes it from view and displays no error
********************************************************************************/
package org.eclipse.rse.internal.services.dstore.files;
@ -928,16 +929,11 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
DataElement de = getElementFor(remotePath);
DataElement status = dsStatusCommand(de, IUniversalDataStoreConstants.C_DELETE, monitor);
if (status == null) return false;
if (de.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR))
{
if (FileSystemMessageUtil.getSourceMessage(status).equals(IServiceConstants.SUCCESS)) return true;
else throw new SystemMessageException(getMessage("RSEF1300").makeSubstitution(FileSystemMessageUtil.getSourceLocation(status))); //$NON-NLS-1$
}
else
{
if (FileSystemMessageUtil.getSourceMessage(status).equals(IServiceConstants.SUCCESS)) {
return true;
} else {
throw new SystemMessageException(getMessage("RSEF1300").makeSubstitution(FileSystemMessageUtil.getSourceLocation(status))); //$NON-NLS-1$
}
}
public boolean deleteBatch(String[] remoteParents, String[] fileNames, IProgressMonitor monitor) throws SystemMessageException
@ -953,9 +949,11 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
}
DataElement status = dsStatusCommand((DataElement) dataElements.get(0), dataElements, IUniversalDataStoreConstants.C_DELETE_BATCH, monitor);
if (status == null) return false;
if (FileSystemMessageUtil.getSourceMessage(status).startsWith(IServiceConstants.FAILED))
throw new SystemMessageException(getMessage("RSEF1300").makeSubstitution(FileSystemMessageUtil.getSourceLocation(status))); //$NON-NLS-1$
else return true;
if (FileSystemMessageUtil.getSourceMessage(status).equals(IServiceConstants.SUCCESS)) {
return true;
} else {
throw new SystemMessageException(getMessage("RSEF1300").makeSubstitution(FileSystemMessageUtil.getSourceLocation(status))); //$NON-NLS-1$
}
}
public boolean rename(String remoteParent, String oldName, String newName, IProgressMonitor monitor) throws SystemMessageException